mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
The bufsize argument to Popen() should accept None meaning the default (0).
This commit is contained in:
parent
ad5b9de288
commit
46a05a7db5
2 changed files with 10 additions and 0 deletions
|
@ -455,6 +455,14 @@ class ProcessTestCase(unittest.TestCase):
|
|||
else:
|
||||
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
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue