From cdd5fc90137023c9d2de336531b281f31740358f Mon Sep 17 00:00:00 2001 From: R David Murray Date: Sun, 13 Mar 2011 22:37:18 -0400 Subject: #11490: EACCES can also mean command not found --- Lib/test/test_subprocess.py | 3 ++- Misc/NEWS | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 37dc245..04eb9b1 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -573,7 +573,8 @@ class ProcessTestCase(BaseTestCase): subprocess.Popen(['nonexisting_i_hope'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) - if c.exception.errno != errno.ENOENT: # ignore "no such file" + # ignore errors that indicate the command was not found + if c.exception.errno not in (errno.ENOENT, errno.EACCES): raise c.exception def test_handles_closed_on_exception(self): diff --git a/Misc/NEWS b/Misc/NEWS index c3117cb..2b52138 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -251,6 +251,9 @@ Build Tests ----- +- Issue #11490: test_subprocess:test_leaking_fds_on_error no longer gives a + false positive if the last directory in the path is inaccessible. + - Issue #10822: Fix test_posix:test_getgroups failure under Solaris. Patch by Ross Lagerwall. -- cgit v0.12