Skip to content

Commit 2803934

Browse files
authored
Fix test with Python 3.10 (#108)
1 parent e46cddd commit 2803934

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/plugins/test_pyflakes_lint.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Copyright 2017-2020 Palantir Technologies, Inc.
22
# Copyright 2021- Python Language Server Contributors.
33

4+
import sys
5+
46
from pylsp import lsp, uris
57
from pylsp.workspace import Document
68
from pylsp.plugins import pyflakes_lint
@@ -42,7 +44,10 @@ def test_syntax_error_pyflakes(workspace):
4244
doc = Document(DOC_URI, workspace, DOC_SYNTAX_ERR)
4345
diag = pyflakes_lint.pylsp_lint(doc)[0]
4446

45-
assert diag['message'] == 'invalid syntax'
47+
if sys.version_info[:2] >= (3, 10):
48+
assert diag['message'] == "expected ':'"
49+
else:
50+
assert diag['message'] == 'invalid syntax'
4651
assert diag['range']['start'] == {'line': 0, 'character': 12}
4752
assert diag['severity'] == lsp.DiagnosticSeverity.Error
4853

0 commit comments

Comments
 (0)