Skip to content

Improve dict generation for key-dependent branches #135

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions