diff options
Diffstat (limited to 'Lib/test/test_subprocess.py')
-rw-r--r-- | Lib/test/test_subprocess.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 87967ca7f3c..3af523e8346 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -171,6 +171,14 @@ class ProcessTestCase(BaseTestCase): [sys.executable, "-c", "print('BDFL')"]) self.assertIn(b'BDFL', output) + with self.assertRaisesRegex(ValueError, + "stdout argument not allowed, it will be overridden"): + subprocess.check_output([], stdout=None) + + with self.assertRaisesRegex(ValueError, + "check argument not allowed, it will be overridden"): + subprocess.check_output([], check=False) + def test_check_output_nonzero(self): # check_call() function with non-zero return code with self.assertRaises(subprocess.CalledProcessError) as c: |