]> granicus.if.org Git - python/commitdiff
Replace mmap.error with OSError, #16705
authorAndrew Svetlov <andrew.svetlov@gmail.com>
Mon, 17 Dec 2012 20:55:31 +0000 (22:55 +0200)
committerAndrew Svetlov <andrew.svetlov@gmail.com>
Mon, 17 Dec 2012 20:55:31 +0000 (22:55 +0200)
Lib/test/test_mmap.py

index a3de398b9e8a9478d6fd29ad431934dd76a399b1..e3b790990a6bb895947375e7375b2f8c52995248 100644 (file)
@@ -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()