summaryrefslogtreecommitdiff
path: root/Lib/test/test_dbm_dumb.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_dbm_dumb.py')
-rw-r--r--Lib/test/test_dbm_dumb.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_dbm_dumb.py b/Lib/test/test_dbm_dumb.py
index dc88ca64dc..ff63c88c0b 100644
--- a/Lib/test/test_dbm_dumb.py
+++ b/Lib/test/test_dbm_dumb.py
@@ -217,6 +217,14 @@ class DumbDBMTestCase(unittest.TestCase):
self.assertEqual(str(cm.exception),
"DBM object has already been closed")
+ def test_create_new(self):
+ with dumbdbm.open(_fname, 'n') as f:
+ for k in self._dict:
+ f[k] = self._dict[k]
+
+ with dumbdbm.open(_fname, 'n') as f:
+ self.assertEqual(f.keys(), [])
+
def test_eval(self):
with open(_fname + '.dir', 'w') as stream:
stream.write("str(print('Hacked!')), 0\n")