summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_mmap.py
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-17 20:55:31 (GMT)
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-17 20:55:31 (GMT)
commit6eda46de99189812e6982f568bbe941346918964 (patch)
treee2960909494614650737f829d938277d02551f4b /Lib/test/test_mmap.py
parent6d8a122b9c0f9a8032030c208a467a4923a96266 (diff)
downloadcpython-6eda46de99189812e6982f568bbe941346918964.zip
cpython-6eda46de99189812e6982f568bbe941346918964.tar.gz
cpython-6eda46de99189812e6982f568bbe941346918964.tar.bz2
Replace mmap.error with OSError, #16705
Diffstat (limited to 'Lib/test/test_mmap.py')
-rw-r--r--Lib/test/test_mmap.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_mmap.py b/Lib/test/test_mmap.py
index a3de398..e3b7909 100644
--- a/Lib/test/test_mmap.py
+++ b/Lib/test/test_mmap.py
@@ -245,7 +245,7 @@ class MmapTests(unittest.TestCase):
def test_bad_file_desc(self):
# Try opening a bad file descriptor...
- self.assertRaises(mmap.error, mmap.mmap, -2, 4096)
+ self.assertRaises(OSError, mmap.mmap, -2, 4096)
def test_tougher_find(self):
# Do a tougher .find() test. SF bug 515943 pointed out that, in 2.2,
@@ -673,7 +673,7 @@ class MmapTests(unittest.TestCase):
# parameters to _get_osfhandle.
s = socket.socket()
try:
- with self.assertRaises(mmap.error):
+ with self.assertRaises(OSError):
m = mmap.mmap(s.fileno(), 10)
finally:
s.close()