commit | edf14317e32ae945d9b1fe554a7be6ed3dde2834 | [log] [tgz] |
---|---|---|
author | Martin v. Löwis <martin@v.loewis.de> | Tue Dec 23 13:07:51 2008 +0000 |
committer | Martin v. Löwis <martin@v.loewis.de> | Tue Dec 23 13:07:51 2008 +0000 |
tree | 3e2f6a4f2c02f1bbd3d153bd50d930ea04654c35 | |
parent | b90b144c470b203899442b3a9d637c023a778bd9 [diff] [blame] |
Backport of r67908: Added test case to ensure attempts to read from a file opened for writing fail.
diff --git a/Lib/test/test_file.py b/Lib/test/test_file.py index 8308710..f678df6 100644 --- a/Lib/test/test_file.py +++ b/Lib/test/test_file.py
@@ -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):