-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
topic: rewriterelated to the assertion rewrite mechanismrelated to the assertion rewrite mechanismtype: enhancementnew feature or API change, should be merged into features branchnew feature or API change, should be merged into features branch
Description
It seems that if pytest is run in a development directory, it can create files in site-packages/.../__pycache__ which can cause modules to continue getting "imported" even when they are uninstalled.
Many packages use import X as proof of an X package is installed and available.
If you:
- Install an optional package
- Run pytest
- Uninstall the optional package
It can leave your environment in a broken state.
Your input on "why" this is happening would be appreciated.
I wrote out my explanation and reproducer conda-forge/cupy-feedstock#188 (comment)
- a detailed description of the bug or problem you are having
- output of
pip listfrom the virtual environment you are using - pytest and operating system versions
- minimal example if possible
sanderr and guillon
Metadata
Metadata
Assignees
Labels
topic: rewriterelated to the assertion rewrite mechanismrelated to the assertion rewrite mechanismtype: enhancementnew feature or API change, should be merged into features branchnew feature or API change, should be merged into features branch