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

Add a functional regression test. #7586

Closed
wants to merge 1 commit into from

Conversation

mbyrnepr2
Copy link
Member

Type of Changes

Description

Refs #3941

@mbyrnepr2 mbyrnepr2 added the Skip news 🔇 This change does not require a changelog entry label Oct 7, 2022
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.16.0 milestone Oct 8, 2022
@Pierre-Sassoulas Pierre-Sassoulas added Needs astroid update Needs an astroid update (probably a release too) before being mergable Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer labels Oct 8, 2022
@Pierre-Sassoulas Pierre-Sassoulas modified the milestones: 2.16.0, 2.15.4 Oct 8, 2022
@DanielNoord
Copy link
Collaborator

I recently changed opinion about these regressions tests: imo they unnecessarily prolong the pytest test suite. As long as there is a regression test in astroid the only thing this is testing is whether we are using astroid above a certain version number. I don't think we need tests for that as I can't see a reason where that would regress unexpectedly.

I'm obviously open to counter arguments as to why we should add such tests!

@Pierre-Sassoulas
Copy link
Member

Maybe we should think about it on a case by case basis. I think that depending on the complexity of the pylint code that surround the astroid parsing it can make sense or not to add a test. For example if we were previously patching astroid's deficiency or if the checker is very complex we need the regression tests to be sure that we can remove the patching or refactor a checker without regression. If the check is very simple and is only based on astroid's result that is faulty then yes the regression tests is only a waste of time.

@mbyrnepr2
Copy link
Member Author

So perhaps the solution would be to move this test to where existing Enum tests live in the Pylint test suite instead of excluding the case entirely. Maybe someday a change in Astroid will reintroduce this issue to Pylint.

@DanielNoord
Copy link
Collaborator

The test in pylint-dev/astroid#1820 specifically checks for the name in locals. Imo, that's good enough for this particular example.

@mbyrnepr2
Copy link
Member Author

The test in PyCQA/astroid#1820 specifically checks for the name in locals. Imo, that's good enough for this particular example.

OK I'm happy with that!

@mbyrnepr2 mbyrnepr2 closed this Oct 8, 2022
@mbyrnepr2 mbyrnepr2 deleted the 3941_regression_test branch October 8, 2022 09:49
@Pierre-Sassoulas Pierre-Sassoulas added Backported and removed Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer labels Oct 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported Needs astroid update Needs an astroid update (probably a release too) before being mergable Skip news 🔇 This change does not require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants