mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Raise TypeError if bufsize argument is not an integer. Patch 1071755, slightly modified.
This commit is contained in:
parent
6fdf3cbb13
commit
738131d391
2 changed files with 14 additions and 0 deletions
|
@ -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
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue