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
446ff148
Kaydet (Commit)
446ff148
authored
Mar 23, 2010
tarafından
Florent Xicluna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
The standard error should be empty when the signal is killed, except on SIGINT.
üst
fc4d6d77
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
test_subprocess.py
Lib/test/test_subprocess.py
+8
-2
No files found.
Lib/test/test_subprocess.py
Dosyayı görüntüle @
446ff148
...
...
@@ -669,18 +669,22 @@ class POSIXProcessTestCase(BaseTestCase):
def
test_send_signal
(
self
):
p
=
self
.
_kill_process
(
'send_signal'
,
signal
.
SIGINT
)
_
,
stderr
=
p
.
communicate
()
self
.
assertNotEqual
(
p
.
wait
(),
0
)
self
.
assertStderrEqual
(
stderr
,
"Traceback (most recent call last):
\n
"
" File
\"
<string>
\"
, line 1, in <module>
\n
"
"KeyboardInterrupt
\n
"
)
self
.
assertNotEqual
(
p
.
wait
(),
0
)
def
test_kill
(
self
):
p
=
self
.
_kill_process
(
'kill'
)
_
,
stderr
=
p
.
communicate
()
self
.
assertStderrEqual
(
stderr
,
''
)
self
.
assertEqual
(
p
.
wait
(),
-
signal
.
SIGKILL
)
def
test_terminate
(
self
):
p
=
self
.
_kill_process
(
'terminate'
)
_
,
stderr
=
p
.
communicate
()
self
.
assertStderrEqual
(
stderr
,
''
)
self
.
assertEqual
(
p
.
wait
(),
-
signal
.
SIGTERM
)
...
...
@@ -756,7 +760,7 @@ class Win32ProcessTestCase(BaseTestCase):
def
_kill_process
(
self
,
method
,
*
args
):
# Some win32 buildbot raises EOFError if stdin is inherited
p
=
subprocess
.
Popen
([
sys
.
executable
,
"-c"
,
"input()"
],
stdin
=
subprocess
.
PIPE
)
stdin
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
# Let the process initialize (Issue #3137)
time
.
sleep
(
0.1
)
...
...
@@ -774,6 +778,8 @@ class Win32ProcessTestCase(BaseTestCase):
if
count
>
1
:
print
>>
sys
.
stderr
,
(
"p.{}{} succeeded after "
"{} attempts"
.
format
(
method
,
args
,
count
))
_
,
stderr
=
p
.
communicate
()
self
.
assertStderrEqual
(
stderr
,
''
)
self
.
assertEqual
(
p
.
wait
(),
returncode
)
self
.
assertNotEqual
(
returncode
,
0
)
...
...
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