Index: Lib/dbm/__init__.py =================================================================== --- Lib/dbm/__init__.py (Revision 66550) +++ Lib/dbm/__init__.py (Arbeitskopie) @@ -51,9 +51,7 @@ _defaultmod = None _modules = {} -error = (error, IOError) - def open(file, flag = 'r', mode = 0o666): global _defaultmod if _defaultmod is None: Index: Lib/test/test_dbm.py =================================================================== --- Lib/test/test_dbm.py (Revision 66550) +++ Lib/test/test_dbm.py (Arbeitskopie) @@ -57,6 +57,9 @@ def test_error(self): self.assert_(issubclass(self.module.error, IOError)) + def test_anydbm_not_existing(self): + self.assertRaises(dbm.error, dbm.open, _fname) + def test_anydbm_creation(self): f = dbm.open(_fname, 'c') self.assertEqual(list(f.keys()), [])