mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-32667: Fix tests when $PATH contains a file (#5322)
Some tests failed when the PATH environment variable contained a path to an existing file. Fix tests to ignore also NotADirectoryError, not only FileNotFoundError and PermissionError.
This commit is contained in:
parent
93a6119f08
commit
b31206a223
2 changed files with 8 additions and 9 deletions
|
@ -79,7 +79,7 @@ class TraceBackend:
|
|||
try:
|
||||
output = self.trace(abspath("assert_usable" + self.EXTENSION))
|
||||
output = output.strip()
|
||||
except (FileNotFoundError, PermissionError) as fnfe:
|
||||
except (FileNotFoundError, NotADirectoryError, PermissionError) as fnfe:
|
||||
output = str(fnfe)
|
||||
if output != "probe: success":
|
||||
raise unittest.SkipTest(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue