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
20f4bd4a
Kaydet (Commit)
20f4bd4a
authored
Mar 05, 2015
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #21619: Try to fix test_broken_pipe_cleanup()
üst
f7f3b0a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
test_subprocess.py
Lib/test/test_subprocess.py
+9
-6
No files found.
Lib/test/test_subprocess.py
Dosyayı görüntüle @
20f4bd4a
...
@@ -2523,13 +2523,16 @@ class ContextManagerTests(BaseTestCase):
...
@@ -2523,13 +2523,16 @@ class ContextManagerTests(BaseTestCase):
def
test_broken_pipe_cleanup
(
self
):
def
test_broken_pipe_cleanup
(
self
):
"""Broken pipe error should not prevent wait() (Issue 21619)"""
"""Broken pipe error should not prevent wait() (Issue 21619)"""
proc
=
subprocess
.
Popen
([
sys
.
executable
,
"-c"
,
args
=
[
sys
.
executable
,
"-c"
,
"import sys;"
"import sys;"
"sys.stdin.close();"
"sys.stdin.close();"
"sys.stdout.close();"
# Signals that input pipe is closed
"sys.stdout.close();"
]
# Signals that input pipe is closed
],
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
)
proc
=
subprocess
.
Popen
(
args
,
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
bufsize
=
support
.
PIPE_MAX_SIZE
*
2
)
proc
.
stdout
.
read
()
# Make sure subprocess has closed its input
proc
.
stdout
.
read
()
# Make sure subprocess has closed its input
proc
.
stdin
.
write
(
b
"
buffered data"
)
proc
.
stdin
.
write
(
b
"
x"
*
support
.
PIPE_MAX_SIZE
)
self
.
assertIsNone
(
proc
.
returncode
)
self
.
assertIsNone
(
proc
.
returncode
)
self
.
assertRaises
(
OSError
,
proc
.
__exit__
,
None
,
None
,
None
)
self
.
assertRaises
(
OSError
,
proc
.
__exit__
,
None
,
None
,
None
)
self
.
assertEqual
(
0
,
proc
.
returncode
)
self
.
assertEqual
(
0
,
proc
.
returncode
)
...
...
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