[Python-modules-team] Bug#860656: python-biplist: FTBFS on i386: dh_auto_test: pybuild --test --test-nose -i python{version} -p 2.7 returned exit code 13

Chris Lamb lamby at debian.org
Sun May 21 19:32:11 UTC 2017


tags 860656 + patch
thanks

Patch attached.


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
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)
         


More information about the Python-modules-team mailing list