mixer
mixer copied to clipboard
Support for type annotations and TypedDict
class Test:
one: int
two: int
name: str
class Scheme:
name: str
money: int
male: bool
prop: Test
scheme = mixer.blend(Scheme, prop__one=1)
from typing import TypedDict
class Test(TypedDict):
one: int
two: int
name: str
scheme = mixer.blend(Test, name='John') ##{"one": 5, "two": 7, "name": "John"}
Especially support for typed dictionaries would be great for generating test cases. I would like to develop this if other people also find this useful and I have the time.