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
0a26235e
Kaydet (Commit)
0a26235e
authored
Ara 30, 2002
tarafından
Barry Warsaw
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add some missing tests. Should now test everything that pybsddb's
test suite tests.
üst
bad8ff08
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
18 deletions
+26
-18
test_bsddb3.py
Lib/test/test_bsddb3.py
+26
-18
No files found.
Lib/test/test_bsddb3.py
Dosyayı görüntüle @
0a26235e
...
@@ -2,58 +2,66 @@
...
@@ -2,58 +2,66 @@
"""
"""
Run all test cases.
Run all test cases.
"""
"""
import
sys
import
sys
import
unittest
import
unittest
from
test.test_support
import
requires
,
verbose
,
run_suite
from
test.test_support
import
requires
,
verbose
,
run_suite
requires
(
'bsddb'
)
verbose
=
0
# When running as a script instead of within the regrtest framework, skip the
# requires test, since it's obvious we want to run them.
if
__name__
<>
'__main__'
:
requires
(
'bsddb'
)
verbose
=
False
if
'verbose'
in
sys
.
argv
:
if
'verbose'
in
sys
.
argv
:
verbose
=
1
verbose
=
True
sys
.
argv
.
remove
(
'verbose'
)
sys
.
argv
.
remove
(
'verbose'
)
if
'silent'
in
sys
.
argv
:
# take care of old flag, just in case
if
'silent'
in
sys
.
argv
:
# take care of old flag, just in case
verbose
=
0
verbose
=
False
sys
.
argv
.
remove
(
'silent'
)
sys
.
argv
.
remove
(
'silent'
)
def
suite
():
def
suite
():
test_modules
=
[
'test_compat'
,
test_modules
=
[
'test_associate'
,
'test_basics'
,
'test_basics'
,
'test_misc
'
,
'test_compat
'
,
'test_dbobj'
,
'test_dbobj'
,
'test_recno'
,
'test_queue'
,
'test_get_none'
,
'test_dbshelve'
,
'test_dbshelve'
,
'test_dbtables'
,
'test_dbtables'
,
'test_thread'
,
'test_env_close'
,
'test_get_none'
,
'test_join'
,
'test_lock'
,
'test_lock'
,
'test_associate'
,
'test_misc'
,
'test_queue'
,
'test_recno'
,
'test_thread'
,
]
]
alltests
=
unittest
.
TestSuite
()
alltests
=
unittest
.
TestSuite
()
for
name
in
test_modules
:
for
name
in
test_modules
:
module
=
__import__
(
"bsddb.test."
+
name
,
globals
(),
locals
(),
name
)
module
=
__import__
(
"bsddb.test."
+
name
,
globals
(),
locals
(),
name
)
print
module
,
name
#
print module,name
alltests
.
addTest
(
module
.
suite
())
alltests
.
addTest
(
module
.
test_
suite
())
return
alltests
return
alltests
# For invocation through regrtest
# For invocation through regrtest
def
test_main
():
def
test_main
():
tests
=
suite
()
tests
=
suite
()
run_suite
(
tests
)
run_suite
(
tests
)
# For invocation as a script
# For invocation as a script
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
from
bsddb
import
db
from
bsddb
import
db
print
'-='
*
38
print
'-='
*
38
print
db
.
DB_VERSION_STRING
print
db
.
DB_VERSION_STRING
print
'bsddb
3.db.version():
%
s'
%
(
db
.
version
(),
)
print
'bsddb
.db.version():
%
s'
%
(
db
.
version
(),
)
print
'bsddb
3
.db.__version__:
%
s'
%
db
.
__version__
print
'bsddb.db.__version__:
%
s'
%
db
.
__version__
print
'bsddb
3
.db.cvsid:
%
s'
%
db
.
cvsid
print
'bsddb.db.cvsid:
%
s'
%
db
.
cvsid
print
'python version:
%
s'
%
sys
.
version
print
'python version:
%
s'
%
sys
.
version
print
'-='
*
38
print
'-='
*
38
unittest
.
main
(
defaultTest
=
'suite'
)
unittest
.
main
(
defaultTest
=
'suite'
)
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