summaryrefslogtreecommitdiff
path: root/tests/test_self.py
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2022-07-30 10:46:00 +0200
committerGitHub <noreply@github.com>2022-07-30 10:46:00 +0200
commit36a6723ce6b15e8a466a300b6594d6828305fd67 (patch)
tree20bc1fe7eeb0d9d52053d7d078d2a37554454109 /tests/test_self.py
parentb176645f3c26eb6013f6ef64241473f4bd4a3f99 (diff)
downloadpylint-git-36a6723ce6b15e8a466a300b6594d6828305fd67.tar.gz
[syntax-error] Fix a crash when the line and column can't be retrieved (#7097)
Closes #3860
Diffstat (limited to 'tests/test_self.py')
-rw-r--r--tests/test_self.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/test_self.py b/tests/test_self.py
index 840119586..efa38fab4 100644
--- a/tests/test_self.py
+++ b/tests/test_self.py
@@ -569,12 +569,9 @@ class TestRunTC:
expected_output=expected,
)
- def test_stdin_syntaxerror(self) -> None:
- expected_output = (
- "************* Module a\n"
- "a.py:1:4: E0001: invalid syntax (<unknown>, line 1) (syntax-error)"
- )
-
+ def test_stdin_syntax_error(self) -> None:
+ expected_output = """************* Module a
+a.py:1:4: E0001: Parsing failed: 'invalid syntax (<unknown>, line 1)' (syntax-error)"""
with mock.patch(
"pylint.lint.pylinter._read_stdin", return_value="for\n"
) as mock_stdin: