Pytest fails on importing package in conftest.py with --cache-clear option #8543
Labels
status: needs information
reporter needs to provide more information; can be closed after 2 or more weeks of inactivity
The bug regards the import of the python package fipy I have installed with conda. If I import the package in the test_.py file, everything runs fine. If I import it in the conftest.py it also works fine. BUT when I add the --cache-clear option test discovery fails.
So this command works:
python -m pytest --rootdir "c:\Users\korevma\Repositories\wt_process_models" -s tests_1
although it throws the following warningwhile adding the --cache-clear option fails
If I remove the line
import fipy
fromconftest.py
python -m pytest --rootdir "c:\Users\korevma\Repositories\wt_process_models" -s --cache-clear tests_1
passes without errors or warningsconftest.py
test_something.py
pytest.ini
packages and OS versions
platform win32 -- Python 3.6.13, pytest-6.2.2, py-1.10.0, pluggy-0.13.1 -- C:\Users\korevma\AppData\Local\Continuum\miniconda3\envs\wt_process_models\python.exe
pip -list
The text was updated successfully, but these errors were encountered: