Commits

Armin Rigo committed 5de8873

Support the PyPy error message here

  • Participants
  • Parent commits 078d227

Comments (0)

Files changed (1)

     p = newp(BStructPtr, [12])
     assert p.a1 == 12
     e = py.test.raises(TypeError, newp, BStructPtr, [None])
-    assert "an integer is required" in str(e.value)
+    assert ("an integer is required" in str(e.value) or
+        "unsupported operand type for int(): 'NoneType'" in str(e.value)) #PyPy
     py.test.raises(TypeError, 'p.a1 = "def"')
     if sys.version_info < (3,):
         BEnum2 = new_enum_type(unicode("foo"), (unicode('abc'),), (5,))