Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
f6e47ad4
Commit
f6e47ad4
authored
Mar 22, 2001
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check that f.keys() == [] right after creation -- this prevents bugs
like the one I just fixed to come back and haunt us.
parent
4edbc2a5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
Lib/test/test_bsddb.py
Lib/test/test_bsddb.py
+2
-1
Lib/test/test_dbm.py
Lib/test/test_dbm.py
+2
-1
Lib/test/test_gdbm.py
Lib/test/test_gdbm.py
+2
-1
No files found.
Lib/test/test_bsddb.py
View file @
f6e47ad4
...
...
@@ -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'
]
=
''
...
...
Lib/test/test_dbm.py
View file @
f6e47ad4
...
...
@@ -4,11 +4,12 @@
"""
import
dbm
from
dbm
import
error
from
test_support
import
verbose
from
test_support
import
verbose
,
verify
filename
=
'/tmp/delete_me'
d
=
dbm
.
open
(
filename
,
'c'
)
verify
(
d
.
keys
()
==
[])
d
[
'a'
]
=
'b'
d
[
'12345678910'
]
=
'019237410982340912840198242'
d
.
keys
()
...
...
Lib/test/test_gdbm.py
View file @
f6e47ad4
...
...
@@ -5,11 +5,12 @@
import
gdbm
from
gdbm
import
error
from
test_support
import
verbose
,
TestFailed
from
test_support
import
verbose
,
verify
,
TestFailed
filename
=
'/tmp/delete_me'
g
=
gdbm
.
open
(
filename
,
'c'
)
verify
(
g
.
keys
()
==
[])
g
[
'a'
]
=
'b'
g
[
'12345678910'
]
=
'019237410982340912840198242'
a
=
g
.
keys
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment