diff options
author | Gustavo Niemeyer <gustavo@niemeyer.net> | 2003-04-29 14:53:08 (GMT) |
---|---|---|
committer | Gustavo Niemeyer <gustavo@niemeyer.net> | 2003-04-29 14:53:08 (GMT) |
commit | 572f5233f0263ab75782bbce4bd67259d73e32ac (patch) | |
tree | e2a6945a7feddd4b34febd527a13f024827a94dd /Lib/test/test_bz2.py | |
parent | a649e9cb7af5be27ac66b7e128417b8c7e093264 (diff) | |
download | cpython-572f5233f0263ab75782bbce4bd67259d73e32ac.zip cpython-572f5233f0263ab75782bbce4bd67259d73e32ac.tar.gz cpython-572f5233f0263ab75782bbce4bd67259d73e32ac.tar.bz2 |
Applying patch #728656, by logistix, fixing opening of nonexistent
bz2 files. Also, included a testcase for this problem.
Diffstat (limited to 'Lib/test/test_bz2.py')
-rw-r--r-- | Lib/test/test_bz2.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_bz2.py b/Lib/test/test_bz2.py index 9134aae..64ce6ab 100644 --- a/Lib/test/test_bz2.py +++ b/Lib/test/test_bz2.py @@ -219,11 +219,16 @@ class BZ2FileTest(BaseTest): bz2f.close() def testOpenDel(self): + # "Test opening and deleting a file many times" self.createTempFile() for i in xrange(10000): o = BZ2File(self.filename) del o + def testOpenNonexistent(self): + # "Test opening a nonexistent file" + self.assertRaises(IOError, BZ2File, "/non/existent") + class BZ2CompressorTest(BaseTest): def testCompress(self): # "Test BZ2Compressor.compress()/flush()" |