Port to Python 3.
[catacomb-python] / t / t-convert.py
index 08c660f..cadf7b5 100644 (file)
@@ -54,7 +54,7 @@ class TestConvert (U.TestCase):
     for bad in [lambda x: [x]]:
       me.assertRaises(TypeError, pow, C.MP(5), bad(2))
       me.assertRaises(TypeError, pow, C.MP(5), bad(2), 7)
-      if not T.DEBUGP:
+      if not (T.PY2 and T.DEBUGP):
         ## Debug builds of Python 2 crash here, and it's not our fault.  Run
         ##
         ## $ python2.7-dbg -c 'pow(long(5), 2, [7])'
@@ -84,7 +84,7 @@ class TestConvert (U.TestCase):
       me.assertRaises(TypeError, pow, bad(5), C.GF(2), bad(7))
       me.assertRaises(TypeError, pow, bad(5), bad(2), C.GF(7))
       me.assertRaises(TypeError, pow, C.GF(5), bad(2), bad(7))
-      if not T.DEBUGP:
+      if not (T.PY2 and T.DEBUGP):
         ## Python bug: see above.
         me.assertRaises(TypeError, pow, C.GF(5), 2, bad(7))