[pypy-commit] pypy int_w-refactor: update to cffi/3b6e66b91886, this fixes a test caused by the change of an error message

antocuni noreply at buildbot.pypy.org
Thu Feb 27 11:32:43 CET 2014


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: int_w-refactor
Changeset: r69504:b58f66224d79
Date: 2014-02-27 11:32 +0100
http://bitbucket.org/pypy/pypy/changeset/b58f66224d79/

Log:	update to cffi/3b6e66b91886, this fixes a test caused by the change
	of an error message

diff --git a/pypy/module/_cffi_backend/test/_backend_test_c.py b/pypy/module/_cffi_backend/test/_backend_test_c.py
--- a/pypy/module/_cffi_backend/test/_backend_test_c.py
+++ b/pypy/module/_cffi_backend/test/_backend_test_c.py
@@ -1418,8 +1418,10 @@
     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) or
-        "unsupported operand type for int(): 'NoneType'" in str(e.value)) #PyPy
+    msg = str(e.value)
+    assert ("an integer is required" in msg or  # CPython
+            "unsupported operand type for int(): 'NoneType'" in msg or  # old PyPys
+            "expected integer, got NoneType object" in msg) # newer PyPys
     py.test.raises(TypeError, 'p.a1 = "def"')
     if sys.version_info < (3,):
         BEnum2 = new_enum_type(unicode("foo"), (unicode('abc'),), (5,), BInt)


More information about the pypy-commit mailing list