[Python-checkins] r67913 - in python/branches/release25-maint: Lib/test/test_file.py Misc/NEWS
martin.v.loewis
python-checkins at python.org
Tue Dec 23 14:07:51 CET 2008
Author: martin.v.loewis
Date: Tue Dec 23 14:07:51 2008
New Revision: 67913
Log:
Backport of r67908:
Added test case to ensure attempts to read from a file opened for writing
fail.
Modified:
python/branches/release25-maint/Lib/test/test_file.py
python/branches/release25-maint/Misc/NEWS
Modified: python/branches/release25-maint/Lib/test/test_file.py
==============================================================================
--- python/branches/release25-maint/Lib/test/test_file.py (original)
+++ python/branches/release25-maint/Lib/test/test_file.py Tue Dec 23 14:07:51 2008
@@ -116,6 +116,8 @@
except:
self.assertEquals(self.f.__exit__(*sys.exc_info()), None)
+ def testReadWhenWriting(self):
+ self.assertRaises(IOError, self.f.read)
class OtherFileTests(unittest.TestCase):
Modified: python/branches/release25-maint/Misc/NEWS
==============================================================================
--- python/branches/release25-maint/Misc/NEWS (original)
+++ python/branches/release25-maint/Misc/NEWS Tue Dec 23 14:07:51 2008
@@ -9,6 +9,12 @@
*Release date: XX-XXX-2009*
+Core and builtins
+-----------------
+
+- Added test case to ensure attempts to read from a file opened for writing
+ fail.
+
What's New in Python 2.5.3?
===========================
More information about the Python-checkins
mailing list