Skip to content

Auto-populate modules collection within temporary visiting/inspecting helpers #177

@pawamoy

Description

@pawamoy

Is your feature request related to a problem? Please describe.
Populating the modules collection is important to be able to use all features (notably inheritance).
Helpers like temporary_visited_module and temporary_inspected_module do not populate the collection, so devs have to it themselves, in the tests. That leads to a lot of duplicated code.

collection = ModulesCollection()
with temporary_visited_module(
    """
    code...
    """,
    modules_collection=collection,
) as module:
    collection["module"] = module

Describe the solution you'd like
Do that automatically.

Describe alternatives you've considered
/

Additional context
Same kind of improvement as #171

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions