summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_dbm_dumb.py
diff options
context:
space:
mode:
authorXiang Zhang <angwerzx@126.com>2018-12-12 12:46:55 (GMT)
committerGitHub <noreply@github.com>2018-12-12 12:46:55 (GMT)
commit4fb0b8bc25c52aae8dcb4353e69c1c88999a9a53 (patch)
treeaa3b18ad394fbd5056af5a366e2b4ca6b91d5296 /Lib/test/test_dbm_dumb.py
parent5a718e918db6211b633a7afb2bf537eb5b56cb1b (diff)
downloadcpython-4fb0b8bc25c52aae8dcb4353e69c1c88999a9a53.zip
cpython-4fb0b8bc25c52aae8dcb4353e69c1c88999a9a53.tar.gz
cpython-4fb0b8bc25c52aae8dcb4353e69c1c88999a9a53.tar.bz2
bpo-33106: change dbm key deletion error for readonly file from KeyError to dbm.error (#6295)
Diffstat (limited to 'Lib/test/test_dbm_dumb.py')
-rw-r--r--Lib/test/test_dbm_dumb.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_dbm_dumb.py b/Lib/test/test_dbm_dumb.py
index 58b9d17..e8e827e 100644
--- a/Lib/test/test_dbm_dumb.py
+++ b/Lib/test/test_dbm_dumb.py
@@ -82,10 +82,10 @@ class DumbDBMTestCase(unittest.TestCase):
self.init_db()
f = dumbdbm.open(_fname, 'r')
self.read_helper(f)
- with self.assertRaisesRegex(ValueError,
+ with self.assertRaisesRegex(dumbdbm.error,
'The database is opened for reading only'):
f[b'g'] = b'x'
- with self.assertRaisesRegex(ValueError,
+ with self.assertRaisesRegex(dumbdbm.error,
'The database is opened for reading only'):
del f[b'a']
# get() works as in the dict interface