Skip to content

Improve dict generation for key-dependent branches #135

@Shikaikai02

Description

@Shikaikai02

Hi, I’m exploring the input space of Python APIs for a research project. Many of the functions I target accept **kwargs or other dictionary parameters.
Currently Pynguin builds dicts at random, so code like

def foo(d: dict[str, int]):
    if d['k'] == 10: ...

never enters the if.
Do you have any plans to treat constant keys ('k') as guidance hints, as scalars already are? This would greatly help coverage for dict-heavy APIs.
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions