Skip to content

Commit fa9fb19

Browse files
jsprickeJochen Sprickerhof
and
Jochen Sprickerhof
authored
Make pylint test Python version independent (#138)
Co-authored-by: Jochen Sprickerhof <jspricke@debian.org>
1 parent 85afa3c commit fa9fb19

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

test/plugins/test_pylint_lint.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,7 @@ 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-
if sys.version_info[:2] >= (3, 10):
88-
assert diag['message'].count("expected ':'")
89-
else:
90-
assert diag['message'].startswith('invalid syntax')
87+
assert diag['message'].count("expected ':'") or diag['message'].startswith('invalid syntax')
9188
# Pylint doesn't give column numbers for invalid syntax.
9289
assert diag['range']['start'] == {'line': 0, 'character': 12}
9390
assert diag['severity'] == lsp.DiagnosticSeverity.Error

0 commit comments

Comments
 (0)