Skip to content

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

Merged
serhiy-storchaka merged 1 commit intopython:mainfrom
sobolevn:issue-45878
Nov 23, 2021
Merged

bpo-45878: convert try/except to self.assertRaises in Lib/ctypes/test/test_functions.py#29721
serhiy-storchaka merged 1 commit intopython:mainfrom
sobolevn:issue-45878

Conversation

@sobolevn
Copy link
Copy Markdown
Member

@sobolevn sobolevn commented Nov 23, 2021

Copy link
Copy Markdown
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.

@miss-islington
Copy link
Copy Markdown
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 <mail@sobolevn.me>
@bedevere-bot
Copy link
Copy Markdown

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 <mail@sobolevn.me>
@bedevere-bot
Copy link
Copy Markdown

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

@miss-islington
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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 <mail@sobolevn.me>
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 <mail@sobolevn.me>
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 <mail@sobolevn.me>
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