Skip to content

Fix showing DeprecationWarnings for functional tests #7665

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
Oct 23, 2022

Conversation

cdce8p
Copy link
Member

@cdce8p cdce8p commented Oct 23, 2022

Description

The recwarn fixture for test_functional prevents all DeprecationWarnings from showing up which aren't triggered at import. Noticed while working on a DeprecationWarning for pylint-dev/astroid#1389.

The previous code was added in e37bf8c.

Refs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html#warns

@cdce8p cdce8p added Maintenance Discussion or action around maintaining pylint or the dev workflow Skip news 🔇 This change does not require a changelog entry labels Oct 23, 2022
@cdce8p cdce8p added this to the 2.16.0 milestone Oct 23, 2022
@coveralls
Copy link

coveralls commented Oct 23, 2022

Pull Request Test Coverage Report for Build 3307778080

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 95.358%

Totals Coverage Status
Change from base Build 3304001707: 0.0%
Covered Lines: 17172
Relevant Lines: 18008

💛 - Coveralls

Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

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

Thank you for the fix, that was my bad !

@cdce8p
Copy link
Member Author

cdce8p commented Oct 23, 2022

@Pierre-Sassoulas Seems like you accidentally dismissed the approval.

@Pierre-Sassoulas Pierre-Sassoulas merged commit 40c243b into pylint-dev:main Oct 23, 2022
@Pierre-Sassoulas
Copy link
Member

(I'm planning on creating a standalone pylint testutil package that would be properly tested, I don't dare to tell when 😄 I need adminship in pycka or a pylint organisation first)

@cdce8p cdce8p deleted the remove-recwarn branch October 23, 2022 17:20
@cdce8p
Copy link
Member Author

cdce8p commented Oct 23, 2022

(I'm planning on creating a standalone pylint testutil package that would be properly tested, I don't dare to tell when 😄 I need adminship in pycka or a pylint organisation first)

It seems I'm able to create a new repo in the PyCQA org. You should also be able to already.

Just to clarify, this is just a helper package for running functional tests? The tests themself will stay here?
(That's what I would suggest, at least.)

@Pierre-Sassoulas
Copy link
Member

It would be the current content of pylint.testutil, we'd make it an optional install later on (so pylint is lighter for everyone, but lib developer can still use it without too much change in their requirements). The test we'd move would be the one to test the testutil themselves (tests.testutils https://github.com/PyCQA/pylint/tree/main/tests/testutils).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance Discussion or action around maintaining pylint or the dev workflow Skip news 🔇 This change does not require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants