summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/.test_pylintrc1
-rw-r--r--tests/extensions/test_comparetozero.py5
-rw-r--r--tests/message/unittest_message.py5
-rw-r--r--tests/message/unittest_message_definition_store.py2
-rw-r--r--tests/message/unittest_message_id_store.py3
-rw-r--r--tests/test_config.py4
-rw-r--r--tests/test_functional.py2
-rw-r--r--tests/unittest_checker_similar.py1
8 files changed, 9 insertions, 14 deletions
diff --git a/tests/.test_pylintrc b/tests/.test_pylintrc
index ddbd8c081..742c074f7 100644
--- a/tests/.test_pylintrc
+++ b/tests/.test_pylintrc
@@ -17,7 +17,6 @@ disable=
redefined-outer-name,
abstract-method,
function-redefined,
- unused-import,
too-many-public-methods,
unused-argument,
undefined-loop-variable,
diff --git a/tests/extensions/test_comparetozero.py b/tests/extensions/test_comparetozero.py
index ab3cec298..f01423568 100644
--- a/tests/extensions/test_comparetozero.py
+++ b/tests/extensions/test_comparetozero.py
@@ -9,7 +9,6 @@
"""
import os
-import os.path as osp
import unittest
from pylint import checkers
@@ -36,8 +35,8 @@ class CompareToZeroUsedTC(unittest.TestCase):
cls._linter.disable("I")
def test_comparetozero_message(self):
- elif_test = osp.join(
- osp.dirname(osp.abspath(__file__)), "data", "compare_to_zero.py"
+ elif_test = os.path.join(
+ os.path.dirname(os.path.abspath(__file__)), "data", "compare_to_zero.py"
)
self._linter.check([elif_test])
msgs = self._linter.reporter.messages
diff --git a/tests/message/unittest_message.py b/tests/message/unittest_message.py
index 416718255..5e30f9e5f 100644
--- a/tests/message/unittest_message.py
+++ b/tests/message/unittest_message.py
@@ -3,7 +3,10 @@
from pylint.message import Message
-from .generic_fixtures import message_definitions, store
+from .generic_fixtures import ( # pylint: disable=unused-import
+ message_definitions,
+ store,
+)
def test_new_message(message_definitions):
diff --git a/tests/message/unittest_message_definition_store.py b/tests/message/unittest_message_definition_store.py
index 48b22e7b1..d7422ec9c 100644
--- a/tests/message/unittest_message_definition_store.py
+++ b/tests/message/unittest_message_definition_store.py
@@ -10,7 +10,7 @@ from pylint.checkers import BaseChecker
from pylint.exceptions import InvalidMessageError, UnknownMessageError
from pylint.message import MessageDefinition
-from .generic_fixtures import empty_store, store
+from .generic_fixtures import empty_store, store # pylint: disable=unused-import
@pytest.mark.parametrize(
diff --git a/tests/message/unittest_message_id_store.py b/tests/message/unittest_message_id_store.py
index aeb63cfa1..54518998a 100644
--- a/tests/message/unittest_message_id_store.py
+++ b/tests/message/unittest_message_id_store.py
@@ -4,9 +4,8 @@
import pytest
from pylint.exceptions import InvalidMessageError, UnknownMessageError
-from pylint.message import MessageIdStore
-from .generic_fixtures import (
+from .generic_fixtures import ( # pylint: disable=unused-import
empty_msgid_store,
message_definitions,
msgid_store,
diff --git a/tests/test_config.py b/tests/test_config.py
index 1a8ac81e1..8ea626d03 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -1,7 +1,5 @@
import unittest.mock
-import pytest
-
import pylint.lint
@@ -13,7 +11,6 @@ def test_can_read_toml(tmp_path):
"enable='missing-module-docstring'\n"
"jobs=10\n"
)
-
linter = pylint.lint.PyLinter()
linter.global_set_option = unittest.mock.MagicMock()
linter.read_config_file(str(config_file))
@@ -31,7 +28,6 @@ def test_can_read_setup_cfg(tmp_path):
"enable=missing-module-docstring\n"
"jobs=10\n"
)
-
linter = pylint.lint.PyLinter()
linter.global_set_option = unittest.mock.MagicMock()
linter.read_config_file(str(config_file))
diff --git a/tests/test_functional.py b/tests/test_functional.py
index add4bdcbe..aca73dc8e 100644
--- a/tests/test_functional.py
+++ b/tests/test_functional.py
@@ -19,7 +19,7 @@ import sys
import pytest
-from pylint import checkers, lint, reporters, testutils
+from pylint import testutils
class test_dialect(csv.excel):
diff --git a/tests/unittest_checker_similar.py b/tests/unittest_checker_similar.py
index 7470e06c9..0d6b5aeb9 100644
--- a/tests/unittest_checker_similar.py
+++ b/tests/unittest_checker_similar.py
@@ -9,7 +9,6 @@
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# For details: https://github.com/PyCQA/pylint/blob/master/COPYING
-import sys
from contextlib import redirect_stdout
from io import StringIO
from os.path import abspath, dirname, join