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
19e2203f
Kaydet (Commit)
19e2203f
authored
Şub 19, 2006
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add a unit test for bug fix #1396678.
üst
26caeba3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
__init__.py
Lib/bsddb/__init__.py
+3
-4
test_misc.py
Lib/bsddb/test/test_misc.py
+8
-2
No files found.
Lib/bsddb/__init__.py
Dosyayı görüntüle @
19e2203f
...
@@ -111,11 +111,10 @@ class _iter_mixin(UserDict.DictMixin):
...
@@ -111,11 +111,10 @@ class _iter_mixin(UserDict.DictMixin):
return
return
def iteritems(self):
def iteritems(self):
if not self.db:
return
try:
try:
try:
cur = self._make_iter_cursor()
cur = self._make_iter_cursor()
except AttributeError:
return
# FIXME-20031102-greg: race condition. cursor could
# FIXME-20031102-greg: race condition. cursor could
# be closed by another thread before this call.
# be closed by another thread before this call.
...
...
Lib/bsddb/test/test_misc.py
Dosyayı görüntüle @
19e2203f
...
@@ -7,10 +7,10 @@ import unittest
...
@@ -7,10 +7,10 @@ import unittest
try
:
try
:
# For Pythons w/distutils pybsddb
# For Pythons w/distutils pybsddb
from
bsddb3
import
db
,
dbshelve
from
bsddb3
import
db
,
dbshelve
,
hashopen
except
ImportError
:
except
ImportError
:
# For Python 2.3
# For Python 2.3
from
bsddb
import
db
,
dbshelve
from
bsddb
import
db
,
dbshelve
,
hashopen
#----------------------------------------------------------------------
#----------------------------------------------------------------------
...
@@ -46,6 +46,12 @@ class MiscTestCase(unittest.TestCase):
...
@@ -46,6 +46,12 @@ class MiscTestCase(unittest.TestCase):
env
.
open
(
self
.
homeDir
,
db
.
DB_CREATE
)
env
.
open
(
self
.
homeDir
,
db
.
DB_CREATE
)
assert
self
.
homeDir
==
env
.
db_home
assert
self
.
homeDir
==
env
.
db_home
def
test03_repr_closed_db
(
self
):
db
=
hashopen
(
self
.
filename
)
db
.
close
()
rp
=
repr
(
db
)
self
.
assertEquals
(
rp
,
"{}"
)
#----------------------------------------------------------------------
#----------------------------------------------------------------------
...
...
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