fix test for subprocess (#16644)

This commit is contained in:
Andrew Svetlov 2012-12-26 23:36:17 +02:00
commit 0c8ee7fc8b
1 changed files with 1 additions and 4 deletions

View File

@ -2154,15 +2154,12 @@ class ContextManagerTests(BaseTestCase):
self.assertEqual(proc.returncode, 1)
def test_invalid_args(self):
with self.assertRaises(OSError) as c:
with self.assertRaises(FileNotFoundError) as c:
with subprocess.Popen(['nonexisting_i_hope'],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE) as proc:
pass
if c.exception.errno != errno.ENOENT: # ignore "no such file"
raise c.exception
def test_main():
unit_tests = (ProcessTestCase,