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
d098ff23
Kaydet (Commit)
d098ff23
authored
Eyl 02, 2008
tarafından
Jesus Cea
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Port Python 2.6 bsddb3 testdriver to Python 3.0
üst
f15b4b7d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
60 deletions
+23
-60
test_bsddb3.py
Lib/test/test_bsddb3.py
+23
-60
No files found.
Lib/test/test_bsddb3.py
Dosyayı görüntüle @
d098ff23
...
...
@@ -14,13 +14,13 @@ from test.support import requires, verbose, run_unittest, unlink, rmtree
if
__name__
!=
'__main__'
:
requires
(
'bsddb'
)
import
bsddb.test.test_all
verbose
=
False
if
'verbose'
in
sys
.
argv
:
bsddb
.
test
.
test_all
.
verbose
=
1
verbose
=
True
sys
.
argv
.
remove
(
'verbose'
)
if
'silent'
in
sys
.
argv
:
# take care of old flag, just in case
bsddb
.
test
.
test_all
.
verbose
=
0
verbose
=
False
sys
.
argv
.
remove
(
'silent'
)
...
...
@@ -48,66 +48,29 @@ class TimingCheck(unittest.TestCase):
sys
.
__stdout__
.
flush
()
def
suite
():
try
:
# this is special, it used to segfault the interpreter
import
bsddb.test.test_1413192
finally
:
for
f
in
[
'xxx.db'
,
'__db.001'
,
'__db.002'
,
'__db.003'
,
'log.0000000001'
]:
unlink
(
f
)
test_modules
=
[
'test_associate'
,
'test_basics'
,
'test_compat'
,
'test_compare'
,
'test_dbobj'
,
'test_dbshelve'
,
'test_dbtables'
,
'test_env_close'
,
'test_get_none'
,
'test_join'
,
'test_lock'
,
'test_misc'
,
'test_pickle'
,
'test_queue'
,
'test_recno'
,
'test_thread'
,
'test_sequence'
,
'test_cursor_pget_bug'
,
]
alltests
=
unittest
.
TestSuite
()
for
name
in
test_modules
:
module
=
__import__
(
"bsddb.test."
+
name
,
globals
(),
locals
(),
name
)
#print module,name
alltests
.
addTest
(
module
.
test_suite
())
alltests
.
addTest
(
unittest
.
makeSuite
(
TimingCheck
))
return
alltests
# For invocation through regrtest
def
test_main
():
run_unittest
(
suite
())
db_home
=
os
.
path
.
join
(
tempfile
.
gettempdir
(),
'db_home'
)
# The only reason to remove db_home is in case if there is an old
# one lying around. This might be by a different user, so just
# ignore errors. We should always make a unique name now.
from
bsddb
import
db
from
bsddb.test
import
test_all
test_all
.
set_test_path_prefix
(
os
.
path
.
join
(
tempfile
.
gettempdir
(),
'z-test_bsddb3-
%
s'
%
os
.
getpid
()))
# Please leave this print in, having this show up in the buildbots
# makes diagnosing problems a lot easier.
print
(
db
.
DB_VERSION_STRING
,
file
=
sys
.
stderr
)
print
(
'Test path prefix: '
,
test_all
.
get_test_path_prefix
(),
file
=
sys
.
stderr
)
try
:
rmtree
(
db_home
)
except
:
pass
rmtree
(
'db_home
%
d'
%
os
.
getpid
())
run_unittest
(
test_all
.
suite
(
module_prefix
=
'bsddb.test.'
,
timing_check
=
TimingCheck
))
finally
:
# The only reason to remove db_home is in case if there is an old
# one lying around. This might be by a different user, so just
# ignore errors. We should always make a unique name now.
try
:
test_all
.
remove_test_path_directory
()
except
:
pass
# For invocation as a script
if
__name__
==
'__main__'
:
from
bsddb
import
db
print
(
'-='
*
38
)
print
(
db
.
DB_VERSION_STRING
)
print
(
'bsddb.db.version():
%
s'
%
(
db
.
version
(),))
print
(
'bsddb.db.__version__:
%
s'
%
db
.
__version__
)
print
(
'bsddb.db.cvsid:
%
s'
%
db
.
cvsid
)
print
(
'python version:
%
s'
%
sys
.
version
)
print
(
'-='
*
38
)
if
__name__
==
'__main__'
:
test_main
()
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