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

Regression tests for 73 (distutil import error) #5620

Merged
merged 2 commits into from
Jan 1, 2022

Conversation

Pierre-Sassoulas
Copy link
Member

Type of Changes

Type
βœ“ πŸ“œ Docs

Description

Refer to pylint-dev/astroid#1321

@Pierre-Sassoulas Pierre-Sassoulas added Astroid Related to astroid Maintenance Discussion or action around maintaining pylint or the dev workflow labels Dec 31, 2021
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.13.0 milestone Dec 31, 2021
@coveralls
Copy link

coveralls commented Dec 31, 2021

Pull Request Test Coverage Report for Build 1640977431

  • 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 93.694%

Totals Coverage Status
Change from base Build 1640774510: 0.0%
Covered Lines: 14338
Relevant Lines: 15303

πŸ’› - Coveralls

Copy link
Member

@cdce8p cdce8p left a comment

Choose a reason for hiding this comment

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

Was a bit quick there with the approval. Would it make sense to rename the test file? Most other regression tests start with regression_ I believe.

from distutils.util import strtobool

print(distutils.version)
print(strtobool)
Copy link
Collaborator

Choose a reason for hiding this comment

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

DIdn't we also want to have a test to see that distutils still emitted no-member for incorrect imports? We might want to add one case here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Comment on lines 1 to 2
"""
Regression test to check that distutils can be imported
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"""
Regression test to check that distutils can be imported
"""Regression test to check that distutils can be imported

We need to find some pre-commit hook that starts to enforce this.
Perhaps we can look at something for Path at the same time? πŸ˜„

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

For module docstrings I think both are fine. Those are tests after all.

Perhaps we can look at something for Path at the same time? πŸ˜„

I wouldn't recommend that. It's not really worth it and might limit us more than it actually would help.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I wouldn't recommend that. It's not really worth it and might limit us more than it actually would help.

This was a little joke as @Pierre-Sassoulas keeps having to remind me to use it on the PRs I open πŸ˜„
Don't think we should enforce it all the time indeed.

Perhaps those packages allow us to exclude modules? Oh well, something to explore another time.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes we definitely don't want to refactor all the old code that uses os.path.

@Pierre-Sassoulas
Copy link
Member Author

Would it make sense to rename the test file?

I renamed :) Although I think having a nice explicit name is better than "regression_1234" so I kept the explicit part.

@@ -57,7 +57,7 @@ class MessageLocationTuple(NamedTuple):


class ManagedMessage(NamedTuple):
"""Tuple with information ahout a managed message of the linter"""
"""Tuple with information about a managed message of the linter"""
Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps clean up the commit history and don't squash?

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right I wanted to rebase originally but there are other commits that prevents that now.

@Pierre-Sassoulas Pierre-Sassoulas merged commit 11eba03 into main Jan 1, 2022
@Pierre-Sassoulas Pierre-Sassoulas deleted the regression-tests-for-73 branch January 1, 2022 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Astroid Related to astroid Maintenance Discussion or action around maintaining pylint or the dev workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants