summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_subprocess.py
diff options
context:
space:
mode:
authorPeter Astrand <astrand@lysator.liu.se>2004-11-30 21:04:45 (GMT)
committerPeter Astrand <astrand@lysator.liu.se>2004-11-30 21:04:45 (GMT)
commit738131d39130563ad75e73ed544e2a3edbae64f2 (patch)
tree533279296575d1ade838fe29360197cea8a6ec04 /Lib/test/test_subprocess.py
parent6fdf3cbb13077d44f14251034a31b512ebc9005a (diff)
downloadcpython-738131d39130563ad75e73ed544e2a3edbae64f2.zip
cpython-738131d39130563ad75e73ed544e2a3edbae64f2.tar.gz
cpython-738131d39130563ad75e73ed544e2a3edbae64f2.tar.bz2
Raise TypeError if bufsize argument is not an integer. Patch 1071755, slightly modified.
Diffstat (limited to 'Lib/test/test_subprocess.py')
-rw-r--r--Lib/test/test_subprocess.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index 9f7184f..b26d40c 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -394,6 +394,17 @@ class ProcessTestCase(unittest.TestCase):
# Subsequent invocations should just return the returncode
self.assertEqual(p.wait(), 0)
+
+ def test_invalid_bufsize(self):
+ # an invalid type of the bufsize argument should raise
+ # TypeError.
+ try:
+ subprocess.Popen([sys.executable, "-c", "pass"], "orange")
+ except TypeError:
+ pass
+ else:
+ self.fail("Expected TypeError")
+
#
# POSIX tests
#