cleanup
authorStefan Behnel <scoder@users.berlios.de>
Tue, 30 Dec 2008 12:44:55 +0000 (13:44 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Tue, 30 Dec 2008 12:44:55 +0000 (13:44 +0100)
tests/run/charencoding.pyx

index ed1c4c18e26dd83f59f02fd4ef2eeda8dc83cf8b..aa8be91a41c5500e79d539511de4b356019bd529 100644 (file)
@@ -3,19 +3,21 @@
 import sys
 if sys.version_info[0] < 3:
     __doc__ = u"""
+>>> expected = b''.join([chr(i) for i in range(0x10,0xFF,0x11)] + [chr(0xFF)])
+
 >>> s = test_assign()
->>> assert s == b''.join([chr(i) for i in range(0x10,0xFF,0x11)] + [chr(0xFF)]), repr(s)
+>>> assert s == expected, repr(s)
 
 >>> s = test_array()
->>> assert s == b''.join([chr(i) for i in range(0x10,0xFF,0x11)] + [chr(0xFF)]), repr(s)
+>>> assert s == expected, repr(s)
 """
 else:
     __doc__ = u"""
 >>> s = test_assign()
->>> assert s == bytes([i for i in range(0x10,0xFF,0x11)] + [0xFF]), repr(s)
+>>> assert s == bytes(list(range(0x10,0xFF,0x11)) + [0xFF]), repr(s)
 
 >>> s = test_array()
->>> assert s == bytes([i for i in range(0x10,0xFF,0x11)] + [0xFF]), repr(s)
+>>> assert s == bytes(list(range(0x10,0xFF,0x11)) + [0xFF]), repr(s)
 """
 
 def test_assign():