summaryrefslogtreecommitdiff
path: root/tests/testutils
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2023-03-28 22:15:52 +0200
committerGitHub <noreply@github.com>2023-03-28 20:15:52 +0000
commitf95b5b126cfc1ec48e4dc83cbb057cd20aa41803 (patch)
tree97568226deda8c07a8e64068fe488bc7236f3e1e /tests/testutils
parentb62143611a4713e4729ce9ecb6398f5f94d82f1a (diff)
downloadpylint-git-f95b5b126cfc1ec48e4dc83cbb057cd20aa41803.tar.gz
[deprecation] Make 'OutputLine' require a fixed number of args (#8474)
Co-authored-by: Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>
Diffstat (limited to 'tests/testutils')
-rw-r--r--tests/testutils/test_output_line.py48
1 files changed, 1 insertions, 47 deletions
diff --git a/tests/testutils/test_output_line.py b/tests/testutils/test_output_line.py
index a7e677157..db0e6eb0e 100644
--- a/tests/testutils/test_output_line.py
+++ b/tests/testutils/test_output_line.py
@@ -134,57 +134,11 @@ def test_output_line_to_csv(confidence: Confidence, message: _MessageCallable) -
)
-@pytest.mark.parametrize(
- "confidence,expected_confidence", [[None, "UNDEFINED"], ["INFERENCE", "INFERENCE"]]
-)
-def test_output_line_from_csv_deprecated(
- confidence: str | None, expected_confidence: str
-) -> None:
- """Test that the OutputLine NamedTuple is instantiated correctly with from_csv.
- Test OutputLine's of length 5 or 6.
- """
- if confidence:
- proper_csv = [
- "missing-docstring",
- "1",
- "2",
- "obj",
- "msg",
- confidence,
- ]
- else:
- proper_csv = ["missing-docstring", "1", "2", "obj", "msg"]
- with pytest.warns(DeprecationWarning) as records:
- output_line = OutputLine.from_csv(proper_csv, True)
- assert len(records) == 1
-
- expected_column = 2 if PY38_PLUS else 0
- assert output_line == OutputLine(
- symbol="missing-docstring",
- lineno=1,
- column=expected_column,
- end_lineno=None,
- end_column=None,
- object="obj",
- msg="msg",
- confidence=expected_confidence,
- )
-
-
def test_output_line_from_csv() -> None:
"""Test that the OutputLine NamedTuple is instantiated correctly with from_csv.
Test OutputLine of length 8.
"""
- proper_csv = [
- "missing-docstring",
- "1",
- "2",
- "1",
- "None",
- "obj",
- "msg",
- "HIGH",
- ]
+ proper_csv = ["missing-docstring", "1", "2", "1", "None", "obj", "msg", "HIGH"]
expected_column = 2 if PY38_PLUS else 0
output_line = OutputLine.from_csv(proper_csv)