diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 68ffb33c5f6..22b6308b10d 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -530,7 +530,7 @@ def test_leaking_fds_on_error(self): subprocess.Popen(['nonexisting_i_hope'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) - if c.exception.errno != 2: # ignore "no such file" + if c.exception.errno != errno.ENOENT: # ignore "no such file" raise c.exception def test_issue8780(self): diff --git a/Misc/NEWS b/Misc/NEWS index f4f8da833f6..c1a5bc8e08f 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -181,6 +181,8 @@ Tools/Demos Tests ----- +- Issue #9894: Do not hardcode ENOENT in test_subprocess. + - Issue #9315: Added tests for the trace module. Patch by Eli Bendersky. - Issue #9323: Make test.regrtest.__file__ absolute, this was not always the