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
fc4d6d77
Kaydet (Commit)
fc4d6d77
authored
Mar 23, 2010
tarafından
Florent Xicluna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Silence test_subprocess.
üst
875bdf73
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
24 deletions
+12
-24
test_subprocess.py
Lib/test/test_subprocess.py
+12
-24
No files found.
Lib/test/test_subprocess.py
Dosyayı görüntüle @
fc4d6d77
...
...
@@ -33,7 +33,7 @@ except AttributeError:
return
os
.
open
(
fname
,
os
.
O_RDWR
|
os
.
O_CREAT
),
fname
class
Process
TestCase
(
unittest
.
TestCase
):
class
Base
TestCase
(
unittest
.
TestCase
):
def
setUp
(
self
):
# Try to minimize the number of children we have so this test
# doesn't crash on some buildbots (Alphas in particular).
...
...
@@ -52,6 +52,9 @@ class ProcessTestCase(unittest.TestCase):
actual
=
re
.
sub
(
r"\[\d+ refs\]\r?\n?$"
,
""
,
stderr
)
self
.
assertEqual
(
actual
,
expected
,
msg
)
class
ProcessTestCase
(
BaseTestCase
):
def
test_call_seq
(
self
):
# call() function with sequence argument
rc
=
subprocess
.
call
([
sys
.
executable
,
"-c"
,
...
...
@@ -559,17 +562,7 @@ class _SuppressCoreFiles(object):
@unittest.skipIf
(
mswindows
,
"POSIX specific tests"
)
class
POSIXProcessTestCase
(
unittest
.
TestCase
):
def
setUp
(
self
):
# Try to minimize the number of children we have so this test
# doesn't crash on some buildbots (Alphas in particular).
test_support
.
reap_children
()
def
tearDown
(
self
):
for
inst
in
subprocess
.
_active
:
inst
.
wait
()
subprocess
.
_cleanup
()
self
.
assertFalse
(
subprocess
.
_active
,
"subprocess._active not empty"
)
class
POSIXProcessTestCase
(
BaseTestCase
):
def
test_exceptions
(
self
):
# caught & re-raised exceptions
...
...
@@ -654,7 +647,7 @@ class POSIXProcessTestCase(unittest.TestCase):
# Do not inherit file handles from the parent.
# It should fix failures on some platforms.
p
=
subprocess
.
Popen
([
sys
.
executable
,
"-c"
,
"input()"
],
close_fds
=
True
,
stdin
=
subprocess
.
PIPE
)
stdin
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
# Let the process initialize (Issue #3137)
time
.
sleep
(
0.1
)
...
...
@@ -675,7 +668,12 @@ class POSIXProcessTestCase(unittest.TestCase):
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
"
)
def
test_kill
(
self
):
p
=
self
.
_kill_process
(
'kill'
)
...
...
@@ -687,17 +685,7 @@ class POSIXProcessTestCase(unittest.TestCase):
@unittest.skipUnless
(
mswindows
,
"Windows specific tests"
)
class
Win32ProcessTestCase
(
unittest
.
TestCase
):
def
setUp
(
self
):
# Try to minimize the number of children we have so this test
# doesn't crash on some buildbots (Alphas in particular).
test_support
.
reap_children
()
def
tearDown
(
self
):
for
inst
in
subprocess
.
_active
:
inst
.
wait
()
subprocess
.
_cleanup
()
self
.
assertFalse
(
subprocess
.
_active
,
"subprocess._active not empty"
)
class
Win32ProcessTestCase
(
BaseTestCase
):
def
test_startupinfo
(
self
):
# startupinfo argument
...
...
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