fix minor unicode issue in UtilTests
authorpankrat <pankrat@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Sat, 30 May 2009 11:43:22 +0000 (11:43 +0000)
committerpankrat <pankrat@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Sat, 30 May 2009 11:43:22 +0000 (11:43 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@4218 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/engine/SCons/UtilTests.py

index 7d417d3efa6ddb58b832be60dc2c216290c7a82c..9d013ca4683aebcf79907687a537f1aae93224ea 100644 (file)
@@ -697,7 +697,9 @@ bling
 
     def test_intern(self):
         s1 = silent_intern("spam")
-        s2 = silent_intern(u"unicode spam")
+        # Python 1.5 and 3.x do not have a unicode() built-in
+        if sys.version[0] == '2': 
+            s2 = silent_intern(unicode("unicode spam"))
         s3 = silent_intern(42)
         s4 = silent_intern("spam")
         assert id(s1) == id(s4)