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
5b8d24a7
Kaydet (Commit)
5b8d24a7
authored
Şub 22, 2007
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix obvious problems from switch to dict views. Some tests still fail over
some reference count issue (I think).
üst
c7e9d746
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
test_bsddb.py
Lib/test/test_bsddb.py
+5
-6
No files found.
Lib/test/test_bsddb.py
Dosyayı görüntüle @
5b8d24a7
...
...
@@ -94,7 +94,7 @@ class TestBSDDB(unittest.TestCase):
if
not
hasattr
(
self
.
f
,
'iteritems'
):
return
di
=
self
.
d
.
items
(
)
di
=
iter
(
self
.
d
.
items
()
)
while
1
:
try
:
k
,
v
=
di
.
next
()
...
...
@@ -105,7 +105,7 @@ class TestBSDDB(unittest.TestCase):
# it should behave the same as a dict. modifying values
# of existing keys should not break iteration. (adding
# or removing keys should)
fi
=
self
.
f
.
items
(
)
fi
=
iter
(
self
.
f
.
items
()
)
while
1
:
try
:
k
,
v
=
fi
.
next
()
...
...
@@ -159,7 +159,7 @@ class TestBSDDB(unittest.TestCase):
# test the iterator interface (if present)
if
hasattr
(
self
.
f
,
'iteritems'
):
if
debug
:
print
(
"D"
)
i
=
self
.
f
.
items
(
)
i
=
iter
(
self
.
f
.
items
()
)
k
,
v
=
i
.
next
()
if
debug
:
print
(
"E"
)
self
.
f
[
k
]
=
"please don't deadlock"
...
...
@@ -198,7 +198,7 @@ class TestBSDDB(unittest.TestCase):
# do the bsddb._DBWithCursor _iter_mixin internals leak cursors?
nc1
=
len
(
self
.
f
.
_cursor_refs
)
# create iterator
i
=
self
.
f
.
items
(
)
i
=
iter
(
self
.
f
.
items
()
)
nc2
=
len
(
self
.
f
.
_cursor_refs
)
# use the iterator (should run to the first yeild, creating the cursor)
k
,
v
=
i
.
next
()
...
...
@@ -246,8 +246,7 @@ class TestBSDDB(unittest.TestCase):
def
test_keyordering
(
self
):
if
self
.
openmethod
[
0
]
is
not
bsddb
.
btopen
:
return
keys
=
self
.
d
.
keys
()
keys
.
sort
()
keys
=
sorted
(
self
.
d
.
keys
())
self
.
assertEqual
(
self
.
f
.
first
()[
0
],
keys
[
0
])
self
.
assertEqual
(
self
.
f
.
next
()[
0
],
keys
[
1
])
self
.
assertEqual
(
self
.
f
.
last
()[
0
],
keys
[
-
1
])
...
...
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