diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2022-04-22 22:56:12 +0200 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2022-04-26 09:08:23 +0200 |
commit | 8482d2ee74cdf96daffa1f32b8d04868d8c6c8e6 (patch) | |
tree | a92278d431f2265f37c87872a8535ebea876aa9b /tests/checkers | |
parent | c17204d5298ca7a358be78f9b5f880db5f027d59 (diff) | |
download | pylint-git-8482d2ee74cdf96daffa1f32b8d04868d8c6c8e6.tar.gz |
Use an empty pylintrc for tests using project's pylintrc implicitely
We don't want to use the project's pylintrc during tests, because
it means that a change in our config could break tests.
But we want to see if the changes to the default break tests.
Create a private '_Run' class in pylint.testutil._run
Co-authored-by: Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>
Diffstat (limited to 'tests/checkers')
-rw-r--r-- | tests/checkers/unittest_refactoring.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/checkers/unittest_refactoring.py b/tests/checkers/unittest_refactoring.py index 37a40a472..d40e0eb92 100644 --- a/tests/checkers/unittest_refactoring.py +++ b/tests/checkers/unittest_refactoring.py @@ -6,8 +6,8 @@ import os import pytest -from pylint.lint import Run from pylint.reporters.text import TextReporter +from pylint.testutils._run import _Run as Run PARENT_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) REGR_DATA = os.path.join(PARENT_DIR, "regrtest_data") @@ -16,7 +16,10 @@ REGR_DATA = os.path.join(PARENT_DIR, "regrtest_data") @pytest.mark.timeout(8) def test_process_tokens() -> None: with pytest.raises(SystemExit) as cm: - Run([os.path.join(REGR_DATA, "very_long_line.py")], reporter=TextReporter()) + Run( + [os.path.join(REGR_DATA, "very_long_line.py"), "--disable=C"], + reporter=TextReporter(), + ) assert cm.value.code == 0 @@ -28,6 +31,7 @@ def test_issue_5724() -> None: [ os.path.join(REGR_DATA, "issue_5724.py"), "--enable=missing-final-newline", + "--disable=C", ], reporter=TextReporter(), ) |