Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r1022:c7af62d13de6
Date: 2012-10-30 12:44 +0100
http://bitbucket.org/cffi/cffi/changeset/c7af62d13de6/

Log:    Fix tests.

diff --git a/c/test_c.py b/c/test_c.py
--- a/c/test_c.py
+++ b/c/test_c.py
@@ -2310,8 +2310,9 @@
     fw1 = posix.fdopen(fdw, 'w')
     #
     e = py.test.raises(TypeError, fputs, b"hello world\n", fw1)
-    assert str(e.value) == ("initializer for ctype 'struct NOT_FILE *' must "
-                            "be a cdata pointer, not file")
+    assert str(e.value).startswith(
+        "initializer for ctype 'struct NOT_FILE *' must "
+        "be a cdata pointer, not ")
 
 def test_FILE_object():
     if sys.platform == "win32":
@@ -2338,7 +2339,7 @@
     res = fputs(b"hello\n", fw1p)
     assert res >= 0
     res = fileno(fw1p)
-    assert res == fdw
+    assert (res == fdw) == (sys.version_info < (3,))
     fw1.close()
     #
     data = posix.read(fdr, 256)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to