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

Try to import module before creating dummy modules with 'importmode=importlib' #9681

Merged
merged 1 commit into from
Feb 14, 2022

Commits on Feb 14, 2022

  1. Try to import module before creating dummy modules with 'importmode=i…

    …mportlib'
    
    The dummy modules we introduce in `insert_missing_modules` (due to pytest-dev#7856 and pytest-dev#7859)
    would cause problems if the dummy modules actually end up replacing modules
    which could be imported normally because they are available in `PYTHONPATH`.
    
    Now we attempt to first import the module via normal mechanisms, and only
    introduce the dummy modules if the intermediary modules don't actually exist.
    
    Close pytest-dev#9645
    nicoddemus committed Feb 14, 2022
    Configuration menu
    Copy the full SHA
    747b837 View commit details
    Browse the repository at this point in the history