Skip to content

Update documentation on how pytest.warns affects DeprecationWarning #9291 #10141

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 2 commits into from
Aug 17, 2022

Conversation

toclarity
Copy link
Contributor

closes #9291

Co-authored-by: Dani Sancas [email protected]

On-behalf-of: @clarityai-eng [email protected]

Signed-off-by: Tatiana Ovary [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.

Thanks @toclarity, appreciate it!

Looks great overall, please take a look at my comments. 😁

**Using with** ``pytest.mark.parametrize``

When using :ref:`pytest.mark.parametrize ref` it is possible to parametrize tests
such that some runs raise a warning and others do not.
Copy link
Member

Choose a reason for hiding this comment

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

Could you please add an example here to illustrate this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

could we put a link to Parametrizing conditional raising and point out that it is done in a similar way?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For example:

This could be achieved in the same way as with exceptions, see 
:ref:`parametrizing_conditional_raising` for an example.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nicoddemus we have added the link. Please let us know if this is acceptable or if a specific example is needed.

toclarity and others added 2 commits August 10, 2022 10:15
Co-authored-by: Dani Sancas <[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 addition, thanks a lot!

@nicoddemus nicoddemus merged commit 3039391 into pytest-dev:main Aug 17, 2022
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.

Document that pytest.warns affects default DeprecationWarning processing
2 participants