Closed
Description
Environment
- pip version: 20.1
- Python version: 3.6+
- OS: Any
Description
Build-in-place leaves a build directory in the working directory, which can sometimes confuse tools like pytest when they discover pyc files inside.
Expected behavior
How to Reproduce
pip install .
pytest
Output
pytest
================================================================================== test session starts ==================================================================================
platform linux -- Python 3.8.2, pytest-5.4.1, py-1.8.1, pluggy-0.13.1
rootdir: /home/omry/dev/hydra, inifile: pytest.ini
plugins: snail-0.1.0
collected 899 items / 1 error / 898 selected
======================================================================================== ERRORS =========================================================================================
_______________________________________________________________ ERROR collecting build/lib/hydra/test_utils/test_utils.py _______________________________________________________________
import file mismatch:
imported module 'hydra.test_utils.test_utils' has this __file__ attribute:
/home/omry/dev/hydra/hydra/test_utils/test_utils.py
which is not the same as the test file we want to collect:
/home/omry/dev/hydra/build/lib/hydra/test_utils/test_utils.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
================================================================================ short test summary info ================================================================================
ERROR build/lib/hydra/test_utils/test_utils.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=================================================================================== 1 error in 0.64s ==