Author: Ryan Gonzalez <[email protected]>
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
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit