Skip to content

Support for type annotations and TypedDict #166

@jvllmr

Description

@jvllmr
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions