tags 860656 + patch
thanks
Patch attached.
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` [email protected] / chris-lamb.co.uk
`-
diff --git a/tests/test_write.py b/tests/test_write.py
index 83c6419..fabd2be 100644
--- a/tests/test_write.py
+++ b/tests/test_write.py
@@ -12,6 +12,7 @@ try:
unicodeStr = lambda x: x.decode('utf-8')
toUnicode = lambda x: x.decode('unicode-escape')
except NameError:
+ long = int
unicode = str
unicodeStr = lambda x: x
toUnicode = lambda x: x
@@ -20,6 +21,12 @@ try:
except NameError:
xrange = range
+# Ensure integers are always shown as '1L' regardless of size on Python 2
+def repr_(x):
+ if isinstance(x, int):
+ x = long(x)
+ return repr(x)
+
class TestWritePlist(unittest.TestCase):
def roundTrip(self, case, xml=False, expected=None, reprTest=True):
@@ -38,7 +45,7 @@ class TestWritePlist(unittest.TestCase):
# test equality
if reprTest is True:
- self.assertEqual(repr(case if expected is None else expected),
repr(readResult))
+ self.assertEqual(repr_(case if expected is None else expected),
repr_(readResult))
else:
self.assertEqual((case if expected is None else expected),
readResult)
_______________________________________________
Python-modules-team mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team