mixer icon indicating copy to clipboard operation
mixer copied to clipboard

Support for type annotations and TypedDict

Open jvllmr opened this issue 2 years ago • 0 comments

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.

jvllmr avatar Jul 04 '22 20:07 jvllmr