Skip to content

bpo-45878: convert try/except to self.assertRaises in Lib/ctypes/test/test_functions.py #29721

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

Merged
merged 1 commit into from
Nov 23, 2021

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Nov 23, 2021

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

There may be reasons of using try/except instead of assertRaises() (the latter affects exception chaining and other subtle details), but in in this case using assertRaises() is correct and beneficial. It is not pure cosmetic change.

@serhiy-storchaka serhiy-storchaka added needs backport to 3.9 only security fixes needs backport to 3.10 only security fixes labels Nov 23, 2021
@serhiy-storchaka serhiy-storchaka merged commit b48ac6f into python:main Nov 23, 2021
@miss-islington
Copy link
Contributor

Thanks @sobolevn for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 23, 2021
…/test/test_functions.py` (pythonGH-29721)

(cherry picked from commit b48ac6f)

Co-authored-by: Nikita Sobolev <[email protected]>
@bedevere-bot
Copy link

GH-29722 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Nov 23, 2021
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 23, 2021
…/test/test_functions.py` (pythonGH-29721)

(cherry picked from commit b48ac6f)

Co-authored-by: Nikita Sobolev <[email protected]>
@bedevere-bot
Copy link

GH-29723 is a backport of this pull request to the 3.9 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Nov 23, 2021
@asvetlov asvetlov added the needs backport to 3.10 only security fixes label Nov 23, 2021
@miss-islington
Copy link
Contributor

Thanks @sobolevn for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington
Copy link
Contributor

Thanks @sobolevn for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-29748 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Nov 24, 2021
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 24, 2021
…/test/test_functions.py` (pythonGH-29721)

(cherry picked from commit b48ac6f)

Co-authored-by: Nikita Sobolev <[email protected]>
remykarem pushed a commit to remykarem/cpython that referenced this pull request Dec 7, 2021
serhiy-storchaka pushed a commit that referenced this pull request Dec 24, 2021
…/test/test_functions.py` (GH-29721) (GH-29723)

(cherry picked from commit b48ac6f)

Co-authored-by: Nikita Sobolev <[email protected]>
serhiy-storchaka pushed a commit that referenced this pull request Dec 24, 2021
…/test/test_functions.py` (GH-29721) (GH-29748)

(cherry picked from commit b48ac6f)

Co-authored-by: Nikita Sobolev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants