6d7fad9
From 823dcabbdd4bdaab6a4d187e1d916c87a2a1fd96 Mon Sep 17 00:00:00 2001
886c611
From: Dan Callaghan <dcallagh@redhat.com>
886c611
Date: Thu, 21 Jul 2016 16:04:56 +1000
6d7fad9
Subject: [PATCH 2/6] fix pyscss tests
886c611
886c611
---
886c611
 tests/test_filters.py | 7 ++++---
886c611
 1 file changed, 4 insertions(+), 3 deletions(-)
886c611
886c611
diff --git a/tests/test_filters.py b/tests/test_filters.py
6d7fad9
index 8ce25f7..db8a796 100644
886c611
--- a/tests/test_filters.py
886c611
+++ b/tests/test_filters.py
886c611
@@ -10,6 +10,7 @@
886c611
 from mock import patch, Mock, DEFAULT
886c611
 from distutils.spawn import find_executable
886c611
 import re
886c611
+from io import BytesIO
886c611
 from webassets.utils import StringIO
886c611
 from webassets import Environment
886c611
 from webassets.exceptions import FilterError
886c611
@@ -1022,7 +1023,7 @@ def setup(self):
886c611
 
886c611
     def test(self):
886c611
         self.mkbundle('foo.scss', filters='pyscss', output='out.css').build()
886c611
-        assert self.get('out.css') == 'h1 {\n  color: #ff0000;\n}\na {\n  color: #ff8000;\n}\n'
886c611
+        assert self.get('out.css') == 'h1 {\n  color: red; }\na {\n  color: #ff8000; }\n'
886c611
 
886c611
     def test_assets(self):
886c611
         try:
886c611
@@ -1030,14 +1031,14 @@ def test_assets(self):
886c611
             # Travis does not support PNG files, see
886c611
             # https://github.com/travis-ci/travis-ci/issues/746
886c611
             from PIL import Image
886c611
-            Image.new('RGB', (10,10)).save(StringIO(), 'png')
886c611
+            Image.new('RGB', (10,10)).save(BytesIO(), 'png')
886c611
         except (ImportError, IOError):
886c611
             raise SkipTest()
886c611
         self.create_files({'noise.scss': 'h1 {background: background-noise()}'})
886c611
         self.mkbundle('noise.scss', filters='pyscss', output='out.css').build()
886c611
 
886c611
         assert doctest_match(
886c611
-            'h1 {\n  background: url("...png");\n}\n',
886c611
+            'h1 {\n  background: url("...png"); }\n',
886c611
             self.get('out.css'),)
886c611
 
886c611
 
886c611
-- 
6d7fad9
2.7.4
886c611