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

clean up pytest.raises tests #4555

Merged
merged 1 commit into from Apr 28, 2022
Merged

clean up pytest.raises tests #4555

merged 1 commit into from Apr 28, 2022

Conversation

davidism
Copy link
Member

Move as much code as possible outside the pytest.raises block. asserts will only run outside the block (it exits early), and other code might raise similar exceptions to the code being tested.

closes #4553

@davidism davidism added this to the 2.1.2 milestone Apr 28, 2022
@davidism davidism changed the base branch from main to 2.1.x April 28, 2022 16:35
@davidism davidism merged commit a0bb10b into 2.1.x Apr 28, 2022
@davidism davidism deleted the pytest_raises_cleanup branch April 28, 2022 16:35
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

asserts with pytest.raises should be outside the with block
1 participant