Benjamin Greiner
9524c8709f
- Update to 1.3.2 * Fix formatting a log message - Add python-lsp-server-pr133-pylint-python310.patch OBS-URL: https://build.opensuse.org/request/show/939983 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-lsp-server?expand=0&rev=13
27 lines
1.2 KiB
Diff
27 lines
1.2 KiB
Diff
From 5ec13561e762db1b333950326672c5bc972a4078 Mon Sep 17 00:00:00 2001
|
|
From: Bruno Pagani <bruno.n.pagani@gmail.com>
|
|
Date: Sun, 5 Dec 2021 19:17:35 +0400
|
|
Subject: [PATCH] Fix test_syntax_error_pylint_py3 for Python 3.10
|
|
|
|
Only the first assert was modified in 2e062830fa45fc849a62e7eef10187e9141f7a00.
|
|
---
|
|
test/plugins/test_pylint_lint.py | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/test/plugins/test_pylint_lint.py b/test/plugins/test_pylint_lint.py
|
|
index f6fcda8..4e6ed06 100644
|
|
--- a/test/plugins/test_pylint_lint.py
|
|
+++ b/test/plugins/test_pylint_lint.py
|
|
@@ -84,7 +84,10 @@ def test_syntax_error_pylint_py3(config, workspace):
|
|
config.plugin_settings('pylint')['executable'] = 'pylint'
|
|
diag = pylint_lint.pylsp_lint(config, doc, True)[0]
|
|
|
|
- assert diag['message'].startswith('invalid syntax')
|
|
+ if sys.version_info[:2] >= (3, 10):
|
|
+ assert diag['message'].count("expected ':'")
|
|
+ else:
|
|
+ assert 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
|