mirror of
https://github.com/python/cpython.git
synced 2026-01-06 23:42:34 +00:00
Replace mmap.error with OSError, #16705
This commit is contained in:
parent
6d8a122b9c
commit
6eda46de99
1 changed files with 2 additions and 2 deletions
|
|
@ -245,7 +245,7 @@ def test_access_parameter(self):
|
|||
|
||||
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 @@ def test_invalid_descriptor(self):
|
|||
# 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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue