Skip to content

Commit 3096e6c

Browse files
Fix test_syntax_error_pylint_py3 for Python 3.10 (#133)
1 parent fb6f1ed commit 3096e6c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/plugins/test_pylint_lint.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ def test_syntax_error_pylint_py3(config, workspace):
8484
config.plugin_settings('pylint')['executable'] = 'pylint'
8585
diag = pylint_lint.pylsp_lint(config, doc, True)[0]
8686

87-
assert diag['message'].startswith('invalid syntax')
87+
if sys.version_info[:2] >= (3, 10):
88+
assert diag['message'].count("expected ':'")
89+
else:
90+
assert diag['message'].startswith('invalid syntax')
8891
# Pylint doesn't give column numbers for invalid syntax.
8992
assert diag['range']['start'] == {'line': 0, 'character': 12}
9093
assert diag['severity'] == lsp.DiagnosticSeverity.Error

0 commit comments

Comments
 (0)