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
d6935631
Kaydet (Commit)
d6935631
authored
Mar 05, 2010
tarafından
Florent Xicluna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Let's use assertIsNone / assertIsNotNone. It's hype.
üst
80e0e2d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
test_subprocess.py
Lib/test/test_subprocess.py
+5
-5
No files found.
Lib/test/test_subprocess.py
Dosyayı görüntüle @
d6935631
...
@@ -655,17 +655,16 @@ class POSIXProcessTestCase(unittest.TestCase):
...
@@ -655,17 +655,16 @@ class POSIXProcessTestCase(unittest.TestCase):
# Let the process initialize correctly (Issue #3137)
# Let the process initialize correctly (Issue #3137)
time
.
sleep
(
0.1
)
time
.
sleep
(
0.1
)
self
.
assertIs
(
p
.
poll
(),
None
)
self
.
assertIs
None
(
p
.
poll
()
)
count
,
maxcount
=
0
,
3
count
,
maxcount
=
0
,
3
# Retry if the process do not receive the SIGINT signal.
# Retry if the process do not receive the SIGINT signal.
while
count
<
maxcount
and
p
.
poll
()
is
None
:
while
count
<
maxcount
and
p
.
poll
()
is
None
:
p
.
send_signal
(
signal
.
SIGINT
)
p
.
send_signal
(
signal
.
SIGINT
)
time
.
sleep
(
0.1
)
time
.
sleep
(
0.1
)
count
+=
1
count
+=
1
if
p
.
poll
()
is
None
:
self
.
assertIsNotNone
(
p
.
poll
(),
"the subprocess did not receive "
raise
test_support
.
TestFailed
(
"the subprocess did not receive "
"the signal SIGINT"
)
"the signal SIGINT"
)
if
count
>
1
:
elif
count
>
1
:
print
>>
sys
.
stderr
,
(
"p.send_signal(SIGINT) succeeded "
print
>>
sys
.
stderr
,
(
"p.send_signal(SIGINT) succeeded "
"after {} attempts"
.
format
(
count
))
"after {} attempts"
.
format
(
count
))
self
.
assertNotEqual
(
p
.
wait
(),
0
)
self
.
assertNotEqual
(
p
.
wait
(),
0
)
...
@@ -824,6 +823,7 @@ def test_main():
...
@@ -824,6 +823,7 @@ def test_main():
ProcessTestCaseNoPoll
,
ProcessTestCaseNoPoll
,
HelperFunctionTests
)
HelperFunctionTests
)
unit_tests
=
(
POSIXProcessTestCase
,)
test_support
.
run_unittest
(
*
unit_tests
)
test_support
.
run_unittest
(
*
unit_tests
)
test_support
.
reap_children
()
test_support
.
reap_children
()
...
...
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