-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-35794: Catch PermissionError in test_no_such_executable #11635
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, maybe just add proposed comment.
@@ -1522,7 +1522,7 @@ def test_no_such_executable(self): | |||
pid = self.spawn_func(no_such_executable, | |||
[no_such_executable], | |||
os.environ) | |||
except FileNotFoundError as exc: | |||
except (FileNotFoundError, PermissionError) as exc: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a comment mentioning bpo-35794 to explain why PermissionError is expected.
Lib/test/test_posix.py
Outdated
@@ -1522,7 +1522,9 @@ def test_no_such_executable(self): | |||
pid = self.spawn_func(no_such_executable, | |||
[no_such_executable], | |||
os.environ) | |||
except FileNotFoundError as exc: | |||
# bpo-35794: PermissionError can be raised if there are | |||
# directories in the $PATH that are not accesible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: accessible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wops! Fixed in last commit
https://bugs.python.org/issue35794