Skip to content

Correct usage of assert raises #70

Merged
hamajyotan merged 3 commits intomainfrom
correct-usage-of-assert-raises-etc
Feb 8, 2026
Merged

Correct usage of assert raises #70
hamajyotan merged 3 commits intomainfrom
correct-usage-of-assert-raises-etc

Conversation

@hamajyotan
Copy link
Copy Markdown
Owner

The second argument to assert_raises does not validate the error message of the exception that is raised.

You must directly check the exception object returned by assert_raises to validate the error message.

@hamajyotan hamajyotan self-assigned this Feb 8, 2026
@hamajyotan hamajyotan merged commit 97be261 into main Feb 8, 2026
22 checks passed
@hamajyotan hamajyotan deleted the correct-usage-of-assert-raises-etc branch February 8, 2026 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant