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/primer | |
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/primer')
-rw-r--r-- | tests/primer/test_primer_stdlib.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/primer/test_primer_stdlib.py b/tests/primer/test_primer_stdlib.py index 59599ae00..6cae6fd36 100644 --- a/tests/primer/test_primer_stdlib.py +++ b/tests/primer/test_primer_stdlib.py @@ -10,7 +10,7 @@ import sys import pytest from pytest import CaptureFixture -import pylint.lint +from pylint.testutils._run import _Run as Run def is_module(filename: str) -> bool: @@ -57,7 +57,7 @@ def test_primer_stdlib_no_crash( # Duplicate code takes too long and is relatively safe # We don't want to lint the test directory which are repetitive disables = ["--disable=duplicate-code", "--ignore=test"] - pylint.lint.Run([test_module_name] + enables + disables) + Run([test_module_name] + enables + disables) except SystemExit as ex: out, err = capsys.readouterr() assert not err, err |