diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2020-11-14 16:03:54 +0100 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2020-11-28 16:09:53 +0100 |
commit | ebd35f03c7b8f7d76b83835df5e9cea287b941b1 (patch) | |
tree | 154a921e7706e033c831fcdb83085de555380bed /tests/lint | |
parent | e83e7792e5a90d13e9fc5f2c003f45f0e80ff5dd (diff) | |
download | pylint-git-ebd35f03c7b8f7d76b83835df5e9cea287b941b1.tar.gz |
Fix PytestCollectionWarning: cannot collect test class TestReporter
Diffstat (limited to 'tests/lint')
-rw-r--r-- | tests/lint/unittest_lint.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/lint/unittest_lint.py b/tests/lint/unittest_lint.py index d60ea957a..3ce1d5e24 100644 --- a/tests/lint/unittest_lint.py +++ b/tests/lint/unittest_lint.py @@ -242,7 +242,7 @@ def disable(): @pytest.fixture(scope="module") def reporter(): - return testutils.TestReporter + return testutils.GenericTestReporter @pytest.fixture @@ -480,7 +480,7 @@ def test_disable_alot(linter): def test_addmessage(linter): - linter.set_reporter(testutils.TestReporter()) + linter.set_reporter(testutils.GenericTestReporter()) linter.open() linter.set_current_module("0123") linter.add_message("C0301", line=1, args=(1, 2)) @@ -492,7 +492,7 @@ def test_addmessage(linter): def test_addmessage_invalid(linter): - linter.set_reporter(testutils.TestReporter()) + linter.set_reporter(testutils.GenericTestReporter()) linter.open() linter.set_current_module("0123") @@ -570,7 +570,7 @@ def test_init_hooks_called_before_load_plugins(): def test_analyze_explicit_script(linter): - linter.set_reporter(testutils.TestReporter()) + linter.set_reporter(testutils.GenericTestReporter()) linter.check(os.path.join(DATA_DIR, "ascript")) assert ["C: 2: Line too long (175/100)"] == linter.reporter.messages @@ -768,7 +768,7 @@ def test_custom_should_analyze_file(): wrong_file = os.path.join(package_dir, "wrong.py") for jobs in [1, 2]: - reporter = testutils.TestReporter() + reporter = testutils.GenericTestReporter() linter = _CustomPyLinter() linter.config.jobs = jobs linter.config.persistent = 0 @@ -801,7 +801,7 @@ def test_multiprocessing(jobs): "wrong_import_position.py", ] - reporter = testutils.TestReporter() + reporter = testutils.GenericTestReporter() linter = PyLinter() linter.config.jobs = jobs linter.config.persistent = 0 @@ -822,7 +822,7 @@ def test_filename_with__init__(init_linter): # This tracks a regression where a file whose name ends in __init__.py, # such as flycheck__init__.py, would accidentally lead to linting the # entire containing directory. - reporter = testutils.TestReporter() + reporter = testutils.GenericTestReporter() linter = init_linter linter.open() linter.set_reporter(reporter) |