mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 06:24:27 +08:00
fix static analysis test skips with latest pytest
Latest pytest ensures pytest.skip is being called with a str parameter. However, test_static_analysis passed over the skip parameter which contains a tuple returned from skip_python_version leading to test regression. Unify the version skip reasons for both, static analysis and integration tests by using a shared BaseTestCase parent to avoid code duplication. Furthermore handle test_static_analysis skip_reason extraction orthogonal to test_completion.
This commit is contained in:
committed by
Dave Halter
parent
a0f95fc89f
commit
527ef6fcdd
@@ -45,8 +45,9 @@ def test_completion(case, monkeypatch, environment, has_typing):
|
||||
|
||||
|
||||
def test_static_analysis(static_analysis_case, environment):
|
||||
if static_analysis_case.skip is not None:
|
||||
pytest.skip(static_analysis_case.skip)
|
||||
skip_reason = static_analysis_case.get_skip_reason(environment)
|
||||
if skip_reason is not None:
|
||||
pytest.skip(skip_reason)
|
||||
else:
|
||||
static_analysis_case.run(assert_static_analysis, environment)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user