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
9b448630
Commit
9b448630
authored
May 18, 2007
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the cleanup so that we're not left with shelftemp.db.* files.
This does nothing to fix the tests though...
parent
ca4439d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
Lib/test/test_shelve.py
Lib/test/test_shelve.py
+10
-12
No files found.
Lib/test/test_shelve.py
View file @
9b448630
...
...
@@ -8,35 +8,33 @@ class TestCase(unittest.TestCase):
fn
=
"shelftemp"
+
os
.
extsep
+
"db"
def
tearDown
(
self
):
for
f
in
glob
.
glob
(
self
.
fn
+
"*"
):
os
.
unlink
(
f
)
def
test_ascii_file_shelf
(
self
):
s
=
shelve
.
open
(
self
.
fn
,
protocol
=
0
)
try
:
s
=
shelve
.
open
(
self
.
fn
,
protocol
=
0
)
s
[
'key1'
]
=
(
1
,
2
,
3
,
4
)
self
.
assertEqual
(
s
[
'key1'
],
(
1
,
2
,
3
,
4
))
s
.
close
()
finally
:
for
f
in
glob
.
glob
(
self
.
fn
+
"*"
):
os
.
unlink
(
f
)
s
.
close
()
def
test_binary_file_shelf
(
self
):
s
=
shelve
.
open
(
self
.
fn
,
protocol
=
1
)
try
:
s
=
shelve
.
open
(
self
.
fn
,
protocol
=
1
)
s
[
'key1'
]
=
(
1
,
2
,
3
,
4
)
self
.
assertEqual
(
s
[
'key1'
],
(
1
,
2
,
3
,
4
))
s
.
close
()
finally
:
for
f
in
glob
.
glob
(
self
.
fn
+
"*"
):
os
.
unlink
(
f
)
s
.
close
()
def
test_proto2_file_shelf
(
self
):
s
=
shelve
.
open
(
self
.
fn
,
protocol
=
2
)
try
:
s
=
shelve
.
open
(
self
.
fn
,
protocol
=
2
)
s
[
'key1'
]
=
(
1
,
2
,
3
,
4
)
self
.
assertEqual
(
s
[
'key1'
],
(
1
,
2
,
3
,
4
))
s
.
close
()
finally
:
for
f
in
glob
.
glob
(
self
.
fn
+
"*"
):
os
.
unlink
(
f
)
s
.
close
()
def
test_in_memory_shelf
(
self
):
d1
=
{}
...
...
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