diff options
| author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-25 16:47:37 +0200 |
|---|---|---|
| committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-25 16:47:37 +0200 |
| commit | f7a17b48d748e1835bcf9df86fb7fb318bb020f8 (patch) | |
| tree | 403d91c57f72d6e538ce09a8037bd658bc619760 /Lib/test/test_bz2.py | |
| parent | 16bdd4120d8452e8e04b124bcdd116608c5166b0 (diff) | |
| download | cpython-git-f7a17b48d748e1835bcf9df86fb7fb318bb020f8.tar.gz | |
Replace IOError with OSError (#16715)
Diffstat (limited to 'Lib/test/test_bz2.py')
| -rw-r--r-- | Lib/test/test_bz2.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_bz2.py b/Lib/test/test_bz2.py index 24a18138fe..fb2f782886 100644 --- a/Lib/test/test_bz2.py +++ b/Lib/test/test_bz2.py @@ -253,8 +253,8 @@ class BZ2FileTest(BaseTest): bz2f.write(b"abc") with BZ2File(self.filename, "r") as bz2f: - self.assertRaises(IOError, bz2f.write, b"a") - self.assertRaises(IOError, bz2f.writelines, [b"a"]) + self.assertRaises(OSError, bz2f.write, b"a") + self.assertRaises(OSError, bz2f.writelines, [b"a"]) def testAppend(self): with BZ2File(self.filename, "w") as bz2f: @@ -429,7 +429,7 @@ class BZ2FileTest(BaseTest): del o def testOpenNonexistent(self): - self.assertRaises(IOError, BZ2File, "/non/existent") + self.assertRaises(OSError, BZ2File, "/non/existent") def testReadlinesNoNewline(self): # Issue #1191043: readlines() fails on a file containing no newline. |
