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
46a05a7d
Kaydet (Commit)
46a05a7d
authored
Haz 07, 2007
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
The bufsize argument to Popen() should accept None meaning the default (0).
üst
ad5b9de2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
subprocess.py
Lib/subprocess.py
+2
-0
test_subprocess.py
Lib/test/test_subprocess.py
+8
-0
No files found.
Lib/subprocess.py
Dosyayı görüntüle @
46a05a7d
...
@@ -465,6 +465,8 @@ class Popen(object):
...
@@ -465,6 +465,8 @@ class Popen(object):
_cleanup
()
_cleanup
()
self
.
_child_created
=
False
self
.
_child_created
=
False
if
bufsize
is
None
:
bufsize
=
0
# Restore default
if
not
isinstance
(
bufsize
,
int
):
if
not
isinstance
(
bufsize
,
int
):
raise
TypeError
(
"bufsize must be an integer"
)
raise
TypeError
(
"bufsize must be an integer"
)
...
...
Lib/test/test_subprocess.py
Dosyayı görüntüle @
46a05a7d
...
@@ -455,6 +455,14 @@ class ProcessTestCase(unittest.TestCase):
...
@@ -455,6 +455,14 @@ class ProcessTestCase(unittest.TestCase):
else
:
else
:
self
.
fail
(
"Expected TypeError"
)
self
.
fail
(
"Expected TypeError"
)
def
test_bufsize_is_none
(
self
):
# bufsize=None should be the same as bufsize=0.
p
=
subprocess
.
Popen
([
sys
.
executable
,
"-c"
,
"pass"
],
None
)
self
.
assertEqual
(
p
.
wait
(),
0
)
# Again with keyword arg
p
=
subprocess
.
Popen
([
sys
.
executable
,
"-c"
,
"pass"
],
bufsize
=
None
)
self
.
assertEqual
(
p
.
wait
(),
0
)
#
#
# POSIX tests
# POSIX tests
#
#
...
...
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