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
dbd2f6d8
Kaydet (Commit)
dbd2f6d8
authored
May 27, 2008
tarafından
Jesus Cea
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Better integration between Python testing and bsddb3
üst
b1a54a35
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
14 deletions
+17
-14
test_all.py
Lib/bsddb/test/test_all.py
+12
-9
test_bsddb3.py
Lib/test/test_bsddb3.py
+5
-5
No files found.
Lib/bsddb/test/test_all.py
Dosyayı görüntüle @
dbd2f6d8
...
...
@@ -67,11 +67,20 @@ def get_new_database_path() :
return
path
#
NOTE: This path is overridden by a unique one and cleaned up
# afterwards when run under regrtest via Lib/test/test_bsddb3.py.
get_new_path
.
prefix
=
"/tmp/z-Berkeley_DB"
#
This path can be overriden via "set_test_path_prefix()".
import
os
,
os
.
path
get_new_path
.
prefix
=
os
.
path
.
join
(
os
.
sep
,
"tmp"
,
"z-Berkeley_DB"
)
get_new_path
.
num
=
0
def
get_test_path_prefix
()
:
return
get_new_path
.
prefix
def
set_test_path_prefix
(
path
)
:
get_new_path
.
prefix
=
path
def
remove_test_path_directory
()
:
test_support
.
rmtree
(
get_new_path
.
prefix
)
try
:
import
threading
get_new_path
.
mutex
=
threading
.
Lock
()
...
...
@@ -100,12 +109,6 @@ test_all.verbose = verbose
def
suite
(
module_prefix
=
''
,
timing_check
=
None
):
try
:
# this is special, it used to segfault the interpreter
import
test_1413192
except
:
pass
test_modules
=
[
'test_associate'
,
'test_basics'
,
...
...
Lib/test/test_bsddb3.py
Dosyayı görüntüle @
dbd2f6d8
...
...
@@ -52,13 +52,13 @@ class TimingCheck(unittest.TestCase):
def
test_main
():
from
bsddb
import
db
from
bsddb.test
import
test_all
test_all
.
get_new_path
.
prefix
=
os
.
path
.
join
(
tempfile
.
gettempdir
(),
'z-test_bsddb3-
%
s'
%
os
.
getpid
(
))
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
>>
sys
.
stderr
,
db
.
DB_VERSION_STRING
print
>>
sys
.
stderr
,
'Test path prefix:
'
,
test_all
.
get_new_path
.
prefix
print
>>
sys
.
stderr
,
'Test path prefix:
'
,
test_all
.
get_test_path_prefix
()
try
:
run_unittest
(
test_all
.
suite
(
module_prefix
=
'bsddb.test.'
,
timing_check
=
TimingCheck
))
...
...
@@ -67,7 +67,7 @@ def test_main():
# one lying around. This might be by a different user, so just
# ignore errors. We should always make a unique name now.
try
:
rmtree
(
test_all
.
get_new_path
.
prefix
)
test_all
.
remove_test_path_directory
(
)
except
:
pass
...
...
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