mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
Skip if attrs not in target environment.
Add check for attrs in test environment and skip if not installed. This is patterned off the existing django tests.
This commit is contained in:
@@ -375,6 +375,10 @@ def test_dataclass_signature(Script, skip_pre_python37, start, start_params):
|
||||
]
|
||||
)
|
||||
def test_attrs_signature(Script, skip_pre_python37, start, start_params):
|
||||
has_attrs = bool(Script('import attrs').infer())
|
||||
if not has_attrs:
|
||||
raise pytest.skip("attrs needed in target environment to run this test")
|
||||
|
||||
code = dedent('''
|
||||
name: str
|
||||
foo = 3
|
||||
|
||||
Reference in New Issue
Block a user