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

[test] Use an empty pylintrc so tests to not depend on system's conf #8350

Merged
merged 2 commits into from
Feb 26, 2023

Conversation

Pierre-Sassoulas
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas commented Feb 26, 2023

Type of Changes

Type
🐛 Bug fix

Description

Closes #8342, and fix test that could create similar bugs with specifics configurations.

@Pierre-Sassoulas Pierre-Sassoulas added Maintenance Discussion or action around maintaining pylint or the dev workflow Skip news 🔇 This change does not require a changelog entry backport maintenance/2.16.x labels Feb 26, 2023
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.16.3 milestone Feb 26, 2023
Copy link
Collaborator

@DanielNoord DanielNoord left a comment

Choose a reason for hiding this comment

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

https://github.com/PyCQA/pylint/blob/main/pylint/testutils/_run.py#L28

We can just use this class. We have fixed this issue before 😄

@Pierre-Sassoulas Pierre-Sassoulas marked this pull request as draft February 26, 2023 21:13
@Pierre-Sassoulas
Copy link
Member Author

Yeah I was checking how to do that generically and I rediscovered this too 😅

@codecov
Copy link

codecov bot commented Feb 26, 2023

Codecov Report

Merging #8350 (31e967f) into main (e7ad3e6) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #8350   +/-   ##
=======================================
  Coverage   95.47%   95.47%           
=======================================
  Files         178      178           
  Lines       18776    18776           
=======================================
  Hits        17926    17926           
  Misses        850      850           

@Pierre-Sassoulas
Copy link
Member Author

All right, should be better, and hopefully emulate using the test runner in new tests from now on 😄

@@ -222,6 +222,7 @@ def test_allow_reexport_package(capsys: CaptureFixture[str]) -> None:
[
f"{os.path.join(REGR_DATA, 'allow_reexport')}",
"--allow-reexport-from-package=yes",
"--disable=missing-module-docstring",
Copy link
Member Author

Choose a reason for hiding this comment

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

We're forced to do it this way because of the check line 232

DanielNoord
DanielNoord previously approved these changes Feb 26, 2023
tests/checkers/unittest_imports.py Outdated Show resolved Hide resolved
Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
@Pierre-Sassoulas Pierre-Sassoulas merged commit 641f526 into pylint-dev:main Feb 26, 2023
@Pierre-Sassoulas Pierre-Sassoulas deleted the fix-8342 branch February 26, 2023 22:21
github-actions bot pushed a commit that referenced this pull request Feb 26, 2023
…8350)

* [test] Use an empty pylintrc so tests to not depend on system's conf

Closes #8342

* Update tests/checkers/unittest_imports.py

Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>

---------

Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
(cherry picked from commit 641f526)
Pierre-Sassoulas added a commit that referenced this pull request Feb 27, 2023
…8350) (#8351)

* [test] Use an empty pylintrc so tests to not depend on system's conf

Closes #8342

* Update tests/checkers/unittest_imports.py

Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>

---------

Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
(cherry picked from commit 641f526)

Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported 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.

pylint/2.16.2: tests failures, test_allow_reexport_package and test_writing_minimal_file
2 participants