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
41ada16c
Kaydet (Commit)
41ada16c
authored
Ock 27, 2008
tarafından
Neal Norwitz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Print periodic "still working" messages since this suite is slow.
üst
8250fbea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
test_bsddb3.py
Lib/test/test_bsddb3.py
+26
-0
No files found.
Lib/test/test_bsddb3.py
Dosyayı görüntüle @
41ada16c
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
Run all test cases.
Run all test cases.
"""
"""
import
sys
import
sys
import
time
import
unittest
import
unittest
from
test.test_support
import
requires
,
verbose
,
run_unittest
,
unlink
from
test.test_support
import
requires
,
verbose
,
run_unittest
,
unlink
...
@@ -21,6 +22,30 @@ if 'silent' in sys.argv: # take care of old flag, just in case
...
@@ -21,6 +22,30 @@ if 'silent' in sys.argv: # take care of old flag, just in case
sys
.
argv
.
remove
(
'silent'
)
sys
.
argv
.
remove
(
'silent'
)
class
TimingCheck
(
unittest
.
TestCase
):
"""This class is not a real test. Its purpose is to print a message
periodically when the test runs slowly. This will prevent the buildbots
from timing out on slow machines."""
# How much time in seconds before printing a 'Still working' message.
# Since this is run at most once between each test module, use a smaller
# interval than other tests.
_PRINT_WORKING_MSG_INTERVAL
=
4
*
60
# next_time is used as a global variable that survives each instance.
# This is necessary since a new instance will be created for each test.
next_time
=
time
.
time
()
+
_PRINT_WORKING_MSG_INTERVAL
def
testCheckElapsedTime
(
self
):
# Print still working message since these tests can be really slow.
now
=
time
.
time
()
if
self
.
next_time
<=
now
:
TimingCheck
.
next_time
=
now
+
self
.
_PRINT_WORKING_MSG_INTERVAL
sys
.
__stdout__
.
write
(
' test_bsddb3 still working, be patient...
\n
'
)
sys
.
__stdout__
.
flush
()
def
suite
():
def
suite
():
try
:
try
:
# this is special, it used to segfault the interpreter
# this is special, it used to segfault the interpreter
...
@@ -53,6 +78,7 @@ def suite():
...
@@ -53,6 +78,7 @@ def suite():
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
.
test_suite
())
alltests
.
addTest
(
module
.
test_suite
())
alltests
.
addTest
(
unittest
.
makeSuite
(
TimingCheck
))
return
alltests
return
alltests
...
...
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