Assume this simple case:
@dataclass
class A:
names: list[str]
ages: dict[str, float]
How could I write a strategy which generates objects of type A
but with the restriction that the keys in the ages
dict are taken from the list names
(which are, in turn, randomly generated)?
Many thanks!
--
You received this message because you are subscribed to the Google Groups "Hypothesis users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hypothesis-use...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/hypothesis-users/020530c4-5857-4b05-861d-b5591b88fe4fn%40googlegroups.com.