[Python-checkins] r67909 - in python/branches/release26-maint: Lib/test/test_file.py Misc/NEWS
skip.montanaro
python-checkins at python.org
Tue Dec 23 04:35:05 CET 2008
Author: skip.montanaro
Date: Tue Dec 23 04:35:04 2008
New Revision: 67909
Log:
Merged revisions 67908 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r67908 | skip.montanaro | 2008-12-22 21:30:15 -0600 (Mon, 22 Dec 2008) | 4 lines
As a result of a regression that snuck into 2.5.3 add a test case that
ensures that when you try to read from a file opened for writing an IOError
is raised.
........
Modified:
python/branches/release26-maint/ (props changed)
python/branches/release26-maint/Lib/test/test_file.py
python/branches/release26-maint/Misc/NEWS
Modified: python/branches/release26-maint/Lib/test/test_file.py
==============================================================================
--- python/branches/release26-maint/Lib/test/test_file.py (original)
+++ python/branches/release26-maint/Lib/test/test_file.py Tue Dec 23 04:35:04 2008
@@ -120,6 +120,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/release26-maint/Misc/NEWS
==============================================================================
--- python/branches/release26-maint/Misc/NEWS (original)
+++ python/branches/release26-maint/Misc/NEWS Tue Dec 23 04:35:04 2008
@@ -12,6 +12,9 @@
Core and Builtins
-----------------
+- Added test case to ensure attempts to read from a file opened for writing
+ fail.
+
- Issue #4597: Fixed several opcodes that weren't always propagating
exceptions.
More information about the Python-checkins
mailing list