FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Make pylint test Python version independent by jspricke · Pull Request #138 · python-lsp/python-lsp-server · GitHub

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
5 changes: 1 addition & 4 deletions test/plugins/test_pylint_lint.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,7 @@ def test_syntax_error_pylint_py3(config, workspace):
config.plugin_settings('pylint')['executable'] = 'pylint'
diag = pylint_lint.pylsp_lint(config, doc, True)[0]

if sys.version_info[:2] >= (3, 10):
assert diag['message'].count("expected ':'")
else:
assert diag['message'].startswith('invalid syntax')
assert diag['message'].count("expected ':'") or diag['message'].startswith('invalid syntax')
# Pylint doesn't give column numbers for invalid syntax.
assert diag['range']['start'] == {'line': 0, 'character': 12}
assert diag['severity'] == lsp.DiagnosticSeverity.Error
Expand Down

Back | FazBrowse Home | New Git URL