mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
fix test for subprocess (#16644)
This commit is contained in:
commit
b172697cd8
1 changed files with 1 additions and 4 deletions
|
@ -2154,15 +2154,12 @@ class ContextManagerTests(BaseTestCase):
|
||||||
self.assertEqual(proc.returncode, 1)
|
self.assertEqual(proc.returncode, 1)
|
||||||
|
|
||||||
def test_invalid_args(self):
|
def test_invalid_args(self):
|
||||||
with self.assertRaises(EnvironmentError) as c:
|
with self.assertRaises(FileNotFoundError) as c:
|
||||||
with subprocess.Popen(['nonexisting_i_hope'],
|
with subprocess.Popen(['nonexisting_i_hope'],
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.PIPE) as proc:
|
stderr=subprocess.PIPE) as proc:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if c.exception.errno != errno.ENOENT: # ignore "no such file"
|
|
||||||
raise c.exception
|
|
||||||
|
|
||||||
|
|
||||||
def test_main():
|
def test_main():
|
||||||
unit_tests = (ProcessTestCase,
|
unit_tests = (ProcessTestCase,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue