Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
8d9db047
Kaydet (Commit)
8d9db047
authored
May 18, 2007
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix the cleanup so that we're not left with shelftemp.db.* files.
This does nothing to fix the tests though...
üst
b5b2270a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
test_shelve.py
Lib/test/test_shelve.py
+10
-12
No files found.
Lib/test/test_shelve.py
Dosyayı görüntüle @
8d9db047
...
@@ -8,35 +8,33 @@ class TestCase(unittest.TestCase):
...
@@ -8,35 +8,33 @@ class TestCase(unittest.TestCase):
fn
=
"shelftemp"
+
os
.
extsep
+
"db"
fn
=
"shelftemp"
+
os
.
extsep
+
"db"
def
tearDown
(
self
):
for
f
in
glob
.
glob
(
self
.
fn
+
"*"
):
os
.
unlink
(
f
)
def
test_ascii_file_shelf
(
self
):
def
test_ascii_file_shelf
(
self
):
s
=
shelve
.
open
(
self
.
fn
,
protocol
=
0
)
try
:
try
:
s
=
shelve
.
open
(
self
.
fn
,
protocol
=
0
)
s
[
'key1'
]
=
(
1
,
2
,
3
,
4
)
s
[
'key1'
]
=
(
1
,
2
,
3
,
4
)
self
.
assertEqual
(
s
[
'key1'
],
(
1
,
2
,
3
,
4
))
self
.
assertEqual
(
s
[
'key1'
],
(
1
,
2
,
3
,
4
))
s
.
close
()
finally
:
finally
:
for
f
in
glob
.
glob
(
self
.
fn
+
"*"
):
s
.
close
()
os
.
unlink
(
f
)
def
test_binary_file_shelf
(
self
):
def
test_binary_file_shelf
(
self
):
s
=
shelve
.
open
(
self
.
fn
,
protocol
=
1
)
try
:
try
:
s
=
shelve
.
open
(
self
.
fn
,
protocol
=
1
)
s
[
'key1'
]
=
(
1
,
2
,
3
,
4
)
s
[
'key1'
]
=
(
1
,
2
,
3
,
4
)
self
.
assertEqual
(
s
[
'key1'
],
(
1
,
2
,
3
,
4
))
self
.
assertEqual
(
s
[
'key1'
],
(
1
,
2
,
3
,
4
))
s
.
close
()
finally
:
finally
:
for
f
in
glob
.
glob
(
self
.
fn
+
"*"
):
s
.
close
()
os
.
unlink
(
f
)
def
test_proto2_file_shelf
(
self
):
def
test_proto2_file_shelf
(
self
):
s
=
shelve
.
open
(
self
.
fn
,
protocol
=
2
)
try
:
try
:
s
=
shelve
.
open
(
self
.
fn
,
protocol
=
2
)
s
[
'key1'
]
=
(
1
,
2
,
3
,
4
)
s
[
'key1'
]
=
(
1
,
2
,
3
,
4
)
self
.
assertEqual
(
s
[
'key1'
],
(
1
,
2
,
3
,
4
))
self
.
assertEqual
(
s
[
'key1'
],
(
1
,
2
,
3
,
4
))
s
.
close
()
finally
:
finally
:
for
f
in
glob
.
glob
(
self
.
fn
+
"*"
):
s
.
close
()
os
.
unlink
(
f
)
def
test_in_memory_shelf
(
self
):
def
test_in_memory_shelf
(
self
):
d1
=
{}
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