diff options
author | William Deegan <bill@baddogconsulting.com> | 2017-02-26 22:19:41 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2017-02-26 22:19:41 (GMT) |
commit | c0590267c0c9c1cca7fedb4fcfb95ae42d1093b0 (patch) | |
tree | c8ec9703d8cc76012474d356cd4161aa821718f7 | |
parent | c9762819c39ed205184e74872f08069b2f358bbc (diff) | |
download | SCons-c0590267c0c9c1cca7fedb4fcfb95ae42d1093b0.zip SCons-c0590267c0c9c1cca7fedb4fcfb95ae42d1093b0.tar.gz SCons-c0590267c0c9c1cca7fedb4fcfb95ae42d1093b0.tar.bz2 |
remove using unicode and just prefix the string with u
-rw-r--r-- | src/engine/SCons/UtilTests.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/engine/SCons/UtilTests.py b/src/engine/SCons/UtilTests.py index 9ebb924..616d419 100644 --- a/src/engine/SCons/UtilTests.py +++ b/src/engine/SCons/UtilTests.py @@ -237,7 +237,11 @@ class UtilTestCase(unittest.TestCase): def test_is_Dict(self): assert is_Dict({}) assert is_Dict(UserDict()) - assert is_Dict(os.environ) + + # os.environ is not a dictionary in python 3 + if sys.version_info < (3,0): + assert is_Dict(os.environ) + try: class mydict(dict): pass @@ -723,7 +727,7 @@ class UtilTestCase(unittest.TestCase): def test_LogicalLines(self): """Test the LogicalLines class""" - content = r""" + content = u""" foo \ bar \ baz @@ -732,7 +736,7 @@ bling \ bling \ bling bling """ - fobj = io.StringIO(unicode(content)) + fobj = io.StringIO(content) lines = LogicalLines(fobj).readlines() assert lines == [ '\n', |