From: Andrew Svetlov Date: Wed, 26 Dec 2012 21:34:54 +0000 (+0200) Subject: fix test for subprocess (#16644) X-Git-Tag: v3.3.1rc1~478 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b172697cd8493f433c577a71433f198e0ca471c8;p=python fix test for subprocess (#16644) --- b172697cd8493f433c577a71433f198e0ca471c8 diff --cc Lib/test/test_subprocess.py index b0cd63c8f2,75eb852cc9..63fa9a7d9a --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@@ -2154,15 -2017,14 +2154,12 @@@ class ContextManagerTests(BaseTestCase) self.assertEqual(proc.returncode, 1) def test_invalid_args(self): -- with self.assertRaises(EnvironmentError) 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 - self.assertEqual(c.exception.errno, errno.ENOENT) -- def test_main(): unit_tests = (ProcessTestCase,