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 and fix tests for init-hook based plugin load #7475

Merged
merged 4 commits into from
Sep 16, 2022
Merged

Add and fix tests for init-hook based plugin load #7475

merged 4 commits into from
Sep 16, 2022

Conversation

daogilvie
Copy link
Contributor

Type of Changes

Type
🔨 Refactoring

Description

This changes 4 existing tests, due to a misunderstanding of the author (past me) in a couple of the details of those tests. Specifically, we now copy a single python file to use as our plugin, and make sure to correctly check for the name as given in the checker classes. We also make sure not to accidentally load the old copy of the plugin, which apparently sits in a directory that is already on the system path.
There is also a single new test, which covers the cases of loading a plugin with init-hook magic, both specified in an rc file, but in different orders.

This and #7276 are the only outstanding PRs preventing closure of #7264.

Refs #7264.

daogilvie added 2 commits September 16, 2022 11:11
This changes 4 existing tests, due to a misunderstanding of the author
(past me) in a couple of the details of those tests.
Specifically, we now copy a single python file to use as our plugin, and
make sure to correctly check for the name as given in the checker
classes. We also make sure not to accidentally load the old copy of the
plugin, which apparently sits in a directory that is already on the
system path.
There is also a single new test, which covers the cases of loading a
plugin with ``init-hook`` magic, both specified in an rc file, but in
different orders.

This should be sufficient to close the issue around #7264.
@coveralls
Copy link

coveralls commented Sep 16, 2022

Pull Request Test Coverage Report for Build 3068087928

  • 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.317%

Totals Coverage Status
Change from base Build 3066552830: 0.0%
Covered Lines: 17037
Relevant Lines: 17874

💛 - Coveralls

DanielNoord
DanielNoord previously approved these changes Sep 16, 2022
tests/lint/unittest_lint.py Outdated Show resolved Hide resolved
As per @DanielNoord's suggestion

Co-authored-by: Daniël van Noord <[email protected]>
DanielNoord
DanielNoord previously approved these changes Sep 16, 2022
@Pierre-Sassoulas Pierre-Sassoulas added the Maintenance Discussion or action around maintaining pylint or the dev workflow label Sep 16, 2022
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 @daogilvie !

@Pierre-Sassoulas Pierre-Sassoulas merged commit e75089b into pylint-dev:main Sep 16, 2022
@daogilvie daogilvie deleted the 7264-regressions-for-plugin-load-oddities branch October 17, 2022 12:41
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants