Skip to content
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

Merged
merged 1 commit into from
Jan 21, 2019

Conversation

pablogsal
Copy link
Member

@pablogsal pablogsal commented Jan 21, 2019

Copy link
Member

@vstinner vstinner left a 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:
Copy link
Member

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.

@@ -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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: accessible?

Copy link
Member Author

@pablogsal pablogsal Jan 21, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants