[Python-checkins] cpython: Replace mmap.error with OSError, #16705

andrew.svetlov python-checkins at python.org
Mon Dec 17 21:55:42 CET 2012


http://hg.python.org/cpython/rev/7aa2ccc5aef1
changeset:   80921:7aa2ccc5aef1
user:        Andrew Svetlov <andrew.svetlov at gmail.com>
date:        Mon Dec 17 22:55:31 2012 +0200
summary:
  Replace mmap.error with OSError, #16705

files:
  Lib/test/test_mmap.py |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Lib/test/test_mmap.py b/Lib/test/test_mmap.py
--- a/Lib/test/test_mmap.py
+++ b/Lib/test/test_mmap.py
@@ -245,7 +245,7 @@
 
     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 @@
             # 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()

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list