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

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

Closed
pawamoy opened this issue Jul 3, 2023 · 0 comments
Labels
feature New feature or request

Comments

@pawamoy
Copy link
Member

pawamoy commented Jul 3, 2023

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

@pawamoy pawamoy added the feature New feature or request label Jul 3, 2023
@pawamoy pawamoy closed this as completed Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant