Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for type annotations and TypedDict #166

Open
jvllmr opened this issue Jul 4, 2022 · 0 comments · May be fixed by #167
Open

Support for type annotations and TypedDict #166

jvllmr opened this issue Jul 4, 2022 · 0 comments · May be fixed by #167

Comments

@jvllmr
Copy link

jvllmr commented Jul 4, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant