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_mmap.py | |
| parent | 16bdd4120d8452e8e04b124bcdd116608c5166b0 (diff) | |
| download | cpython-git-f7a17b48d748e1835bcf9df86fb7fb318bb020f8.tar.gz | |
Replace IOError with OSError (#16715)
Diffstat (limited to 'Lib/test/test_mmap.py')
| -rw-r--r-- | Lib/test/test_mmap.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_mmap.py b/Lib/test/test_mmap.py index e341bc73aa..3d883a9f20 100644 --- a/Lib/test/test_mmap.py +++ b/Lib/test/test_mmap.py @@ -684,11 +684,11 @@ class MmapTests(unittest.TestCase): self.assertTrue(m.closed) def test_context_manager_exception(self): - # Test that the IOError gets passed through + # Test that the OSError gets passed through with self.assertRaises(Exception) as exc: with mmap.mmap(-1, 10) as m: - raise IOError - self.assertIsInstance(exc.exception, IOError, + raise OSError + self.assertIsInstance(exc.exception, OSError, "wrong exception raised in context manager") self.assertTrue(m.closed, "context manager failed") @@ -709,7 +709,7 @@ class LargeMmapTests(unittest.TestCase): f.seek(num_zeroes) f.write(tail) f.flush() - except (IOError, OverflowError): + except (OSError, OverflowError): f.close() raise unittest.SkipTest("filesystem does not have largefile support") return f |
