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])'
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))