summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_subprocess.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-06-07 21:56:45 (GMT)
committerGuido van Rossum <guido@python.org>2007-06-07 21:56:45 (GMT)
commit46a05a7db5a65ebee04a43e0394672a72b37ffa1 (patch)
tree9b341cb102776b9f2656f25163781bcc92a92640 /Lib/test/test_subprocess.py
parentad5b9de288de6b5f965fdfd4db30753c30f9d5ca (diff)
downloadcpython-46a05a7db5a65ebee04a43e0394672a72b37ffa1.zip
cpython-46a05a7db5a65ebee04a43e0394672a72b37ffa1.tar.gz
cpython-46a05a7db5a65ebee04a43e0394672a72b37ffa1.tar.bz2
The bufsize argument to Popen() should accept None meaning the default (0).
Diffstat (limited to 'Lib/test/test_subprocess.py')
-rw-r--r--Lib/test/test_subprocess.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index ec004bf..b44e83a 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -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
#