Fix or ignore lints in tests

This commit is contained in:
Peter Law
2024-06-30 19:03:55 +01:00
parent 5c578e1899
commit 0fcb4468e7
12 changed files with 38 additions and 31 deletions

View File

@@ -206,6 +206,7 @@ def test_numpydoc_parameters_set_of_values():
assert 'capitalize' in names
assert 'numerator' in names
@pytest.mark.skipif(numpydoc_unavailable,
reason='numpydoc module is unavailable')
def test_numpydoc_parameters_set_single_value():
@@ -390,7 +391,8 @@ def test_numpydoc_yields():
@pytest.mark.skipif(numpydoc_unavailable or numpy_unavailable,
reason='numpydoc or numpy module is unavailable')
def test_numpy_returns():
s = dedent('''
s = dedent(
'''
import numpy
x = numpy.asarray([])
x.d'''
@@ -402,7 +404,8 @@ def test_numpy_returns():
@pytest.mark.skipif(numpydoc_unavailable or numpy_unavailable,
reason='numpydoc or numpy module is unavailable')
def test_numpy_comp_returns():
s = dedent('''
s = dedent(
'''
import numpy
x = numpy.array([])
x.d'''

View File

@@ -33,7 +33,9 @@ def test_get_signatures_stdlib(Script):
# Check only on linux 64 bit platform and Python3.8.
@pytest.mark.parametrize('load_unsafe_extensions', [False, True])
@pytest.mark.skipif('sys.platform != "linux" or sys.maxsize <= 2**32 or sys.version_info[:2] != (3, 8)')
@pytest.mark.skipif(
'sys.platform != "linux" or sys.maxsize <= 2**32 or sys.version_info[:2] != (3, 8)',
)
def test_init_extension_module(Script, load_unsafe_extensions):
"""
``__init__`` extension modules are also packages and Jedi should understand

View File

@@ -222,7 +222,7 @@ def test_goto_stubs_on_itself(Script, code, type_):
def test_module_exists_only_as_stub(Script):
try:
import redis
import redis # noqa: F401
except ImportError:
pass
else:
@@ -234,7 +234,7 @@ def test_module_exists_only_as_stub(Script):
def test_django_exists_only_as_stub(Script):
try:
import django
import django # noqa: F401
except ImportError:
pass
else:

View File

@@ -1,4 +1,3 @@
import pytest
from jedi.inference.value import TreeInstance

View File

@@ -48,8 +48,8 @@ def test_venv_and_pths(venv_path, environment):
ETALON = [
# For now disable egg-links. I have no idea how they work... ~ dave
#pjoin('/path', 'from', 'egg-link'),
#pjoin(site_pkg_path, '.', 'relative', 'egg-link', 'path'),
# pjoin('/path', 'from', 'egg-link'),
# pjoin(site_pkg_path, '.', 'relative', 'egg-link', 'path'),
site_pkg_path,
pjoin(site_pkg_path, 'dir-from-foo-pth'),
'/foo/smth.py:module',