Skip to content

Commit 13cb051

Browse files
committed
Improve disambiguators coverage
1 parent cbae84f commit 13cb051

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

tests/test_disambiguators.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,7 @@ class A:
130130
assert fn({}) is A
131131
assert fn(asdict(cl(*vals, **kwargs))) is cl
132132

133-
attr_names = {a.name for a in fields(cl)}
134-
135-
if "xyz" not in attr_names:
136-
assert fn({"xyz": 1}) is A # Uses the fallback.
133+
assert fn({"xyz": 1}) is A # Uses the fallback.
137134

138135

139136
@settings(suppress_health_check=[HealthCheck.filter_too_much, HealthCheck.too_slow])

tests/untyped.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def gen_attr_names() -> Iterable[str]:
167167
def _create_hyp_class(
168168
attrs_and_strategy: list[tuple[_CountingAttr, st.SearchStrategy[PosArgs]]],
169169
frozen=None,
170-
):
170+
) -> SearchStrategy[tuple]:
171171
"""
172172
A helper function for Hypothesis to generate attrs classes.
173173

0 commit comments

Comments
 (0)