mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Check that f.keys() == [] right after creation -- this prevents bugs
like the one I just fixed to come back and haunt us.
This commit is contained in:
parent
4edbc2a54f
commit
f6e47ad4bd
3 changed files with 6 additions and 3 deletions
|
@ -6,7 +6,7 @@
|
|||
import os
|
||||
import bsddb
|
||||
import tempfile
|
||||
from test_support import verbose
|
||||
from test_support import verbose, verify
|
||||
|
||||
def test(openmethod, what):
|
||||
|
||||
|
@ -15,6 +15,7 @@ def test(openmethod, what):
|
|||
|
||||
fname = tempfile.mktemp()
|
||||
f = openmethod(fname, 'c')
|
||||
verify(f.keys() == [])
|
||||
if verbose:
|
||||
print 'creation...'
|
||||
f['0'] = ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue