Skip to content

Improve example #11279

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 3 commits into from
Aug 3, 2023
Merged

Improve example #11279

merged 3 commits into from
Aug 3, 2023

Conversation

calestyo
Copy link
Contributor

@calestyo calestyo commented Aug 3, 2023

Closes #11258.

Needlessly using a different name rather just confuses people.

Signed-off-by: Christoph Anton Mitterer <[email protected]>
…for values

What one typically actually wants in such a case is both, checking for some
resulting values *and* checking for some expected exception.

Since this is easily possible with the `nullcontext` context manager, adapt the
example accordingly.

Signed-off-by: Christoph Anton Mitterer <[email protected]>
Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

Great, thanks @calestyo, appreciate it!

@nicoddemus nicoddemus merged commit b8b7433 into pytest-dev:main Aug 3, 2023
@calestyo
Copy link
Contributor Author

calestyo commented Aug 3, 2023

Thanks :-)

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.

documentation: improve "Parametrizing conditional raising" example?
2 participants