[pypy-commit] cffi default: Improve the test: this should pass too.

arigo noreply at buildbot.pypy.org
Tue Oct 30 12:50:04 CET 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r1023:b516da9bebb9
Date: 2012-10-30 12:49 +0100
http://bitbucket.org/cffi/cffi/changeset/b516da9bebb9/

Log:	Improve the test: this should pass too.

diff --git a/c/test_c.py b/c/test_c.py
--- a/c/test_c.py
+++ b/c/test_c.py
@@ -2283,13 +2283,14 @@
     fw1.write(b"X")
     res = fputs(b"hello world\n", fw1)
     assert res >= 0
-    fw1.close()
+    fw1.flush()     # should not be needed
     #
     p = newp(new_array_type(BCharP, 100), None)
     res = fscanf(fr1, b"%s\n", p)
     assert res == 1
     assert string(p) == b"Xhello"
     fr1.close()
+    fw1.close()
 
 def test_FILE_only_for_FILE_arg():
     if sys.platform == "win32":


More information about the pypy-commit mailing list