mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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. ........
This commit is contained in:
parent
43959e100c
commit
80072cb7fa
2 changed files with 5 additions and 0 deletions
|
@ -123,6 +123,8 @@ class AutoFileTests(unittest.TestCase):
|
|||
except:
|
||||
self.assertEquals(self.f.__exit__(*sys.exc_info()), None)
|
||||
|
||||
def testReadWhenWriting(self):
|
||||
self.assertRaises(IOError, self.f.read)
|
||||
|
||||
class OtherFileTests(unittest.TestCase):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue