diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2023-03-20 23:28:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-20 22:28:19 +0000 |
commit | 1a66274e0c677e02c43ff619a01db99ea432d17f (patch) | |
tree | 438936adafabba9173712c11f77ead4abf5e1346 /pylint | |
parent | a47930321b849502481a59f7d9930a1c93dbdd8a (diff) | |
download | pylint-git-1a66274e0c677e02c43ff619a01db99ea432d17f.tar.gz |
[deprecation] end_line and end_col_offset required in functional tests (#8466)
Diffstat (limited to 'pylint')
-rw-r--r-- | pylint/testutils/checker_test_case.py | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/pylint/testutils/checker_test_case.py b/pylint/testutils/checker_test_case.py index 291f52002..cd2f9c317 100644 --- a/pylint/testutils/checker_test_case.py +++ b/pylint/testutils/checker_test_case.py @@ -5,7 +5,6 @@ from __future__ import annotations import contextlib -import warnings from collections.abc import Generator, Iterator from typing import Any @@ -78,23 +77,8 @@ class CheckerTestCase: assert expected_msg.line == gotten_msg.line, msg assert expected_msg.col_offset == gotten_msg.col_offset, msg if PY38_PLUS and not IS_PYPY or PY39_PLUS: - # TODO: 3.0: Remove deprecated missing arguments and remove the warning - if not expected_msg.end_line == gotten_msg.end_line: - warnings.warn( # pragma: no cover - f"The end_line attribute of {gotten_msg} does not match " - f"the expected value in {expected_msg}. In pylint 3.0 correct end_line " - "attributes will be required for MessageTest.", - DeprecationWarning, - stacklevel=2, - ) - if not expected_msg.end_col_offset == gotten_msg.end_col_offset: - warnings.warn( # pragma: no cover - f"The end_col_offset attribute of {gotten_msg} does not match " - f"the expected value in {expected_msg}. In pylint 3.0 correct end_col_offset " - "attributes will be required for MessageTest.", - DeprecationWarning, - stacklevel=2, - ) + assert expected_msg.end_line == gotten_msg.end_line, msg + assert expected_msg.end_col_offset == gotten_msg.end_col_offset, msg def walk(self, node: nodes.NodeNG) -> None: """Recursive walk on the given node.""" |