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

Fail tests with unexpected warnings #6408

Open
Tracked by #7053
ricardoV94 opened this issue Dec 21, 2022 · 5 comments
Open
Tracked by #7053

Fail tests with unexpected warnings #6408

ricardoV94 opened this issue Dec 21, 2022 · 5 comments

Comments

@ricardoV94
Copy link
Member

Description

Some great maintenance work to cleanup warnings was done in #6067 and #6074 (probably more)

More recently, I started adding pytestmark = pytest.mark.filterwarnings("error"), as in #6407

Ideally, we would move to failing with warnings in the entire test suite, so that we don't regress and catch deprecation issues earlier on. The approach taken in #6407 might be a good start if there's too much going on.

https://docs.pytest.org/en/7.1.x/how-to/capture-warnings.html

@dikwickley
Copy link

hello @ricardoV94 I would like to work on this issue. Can you assign it to me?

@ricardoV94
Copy link
Member Author

We have a policy of not assigning issues formally, just open a PR and it will count as being yours :)

@Raj-Parekh24
Copy link
Contributor

Hey @ricardoV94,

I would like to ask that is this issue still open, or if PR has been raised for it.

If another member is not working I would like to take up this issue.

@Raj-Parekh24
Copy link
Contributor

Hi @ricardoV94,

Based on my understanding, the issue is regarding the capture of the deprecation warning earlier on within the test suites. We have to avoid the capture of deprecation warning in the early stages.

To do this we can add filterwarnings under tool.pytest.ini_options in pyproject.toml.

Please, review the described solution so I can implement it and raise PR for it.

@Raj-Parekh24
Copy link
Contributor

Hey @ricardoV94 ,

Any suggestion regarding this approach?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants