Add complete test

This commit is contained in:
Eric Masseran
2025-08-29 18:37:51 +02:00
parent 3a436df7ac
commit 4ea7981680

View File

@@ -771,6 +771,23 @@ def test_extensions_dataclass_transform_signature(
assert price.name == price_type_infer
def test_dataclass_transform_complete(Script):
script = Script('''\
@dataclass_transform
class Y():
y: int
z = 5
class X(Y):
name: str
foo = 3
def f(x: X):
x.na''')
completion, = script.complete()
assert completion.description == 'name: str'
@pytest.mark.parametrize(
"start, start_params, include_params", dataclass_transform_cases, ids=ids
)