Py3 test case fix
authorStefan Behnel <scoder@users.berlios.de>
Tue, 30 Dec 2008 12:45:14 +0000 (13:45 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Tue, 30 Dec 2008 12:45:14 +0000 (13:45 +0100)
tests/run/charescape.pyx

index 953d528003b17ac4708ad0b9238b3864710fce8c..7165b41d4b6d524721fa9d266d30a3296ff19313 100644 (file)
@@ -1,6 +1,13 @@
-__doc__ = u"""
+import sys
+if sys.version_info[0] < 3:
+    __doc__ = u"""
 >>> s = test()
->>> assert s == ''.join([chr(i) for i in range(1,49)]), repr(s)
+>>> assert s == ''.join(map(chr, range(1,49))), repr(s)
+"""
+else:
+    __doc__ = u"""
+>>> s = test()
+>>> assert s == bytes(range(1,49)), repr(s)
 """
 
 def test():