File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 11# Copyright 2017-2020 Palantir Technologies, Inc.
22# Copyright 2021- Python Language Server Contributors.
33
4+ import sys
5+
46from pylsp import lsp , uris
57from pylsp .workspace import Document
68from 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
You can’t perform that action at this time.
0 commit comments