[pypy-commit] pypy default: Added test for fix for issue 1739
kirbyfan64sos
noreply at buildbot.pypy.org
Mon Apr 28 09:35:22 CEST 2014
Author: Ryan Gonzalez <rymg19 at gmail.com>
Branch:
Changeset: r71034:bc7d31eac294
Date: 2014-04-27 22:30 +0000
http://bitbucket.org/pypy/pypy/changeset/bc7d31eac294/
Log: Added test for fix for issue 1739
diff --git a/rpython/rlib/test/test_streamio.py b/rpython/rlib/test/test_streamio.py
--- a/rpython/rlib/test/test_streamio.py
+++ b/rpython/rlib/test/test_streamio.py
@@ -1104,6 +1104,25 @@
finally:
signal(SIGALRM, SIG_DFL)
+ def test_append_mode(self):
+ try:
+ fo = streamio.open_file_as_stream # shorthand
+ x = fo('.test.file', 'w')
+ x.write('abc123')
+ x.close()
+
+ x = fo('.test.file', 'a')
+ x.write('456')
+ x.close()
+ x = fo('.test.file', 'r')
+ assert x.read() == 'abc123456'
+ x.close()
+ except:
+ raise
+ finally:
+ if os.path.exists('.test.file'):
+ os.remove('.test.file')
+
# Speed test
More information about the pypy-commit
mailing list