pytest ignores -P
(avoid prepend) argument provided to Python
#12546
Labels
topic: collection
related to the collection phase
Python 3.11, Windows 11, pytest==8.2.2
py -P -m pytest new_test.py --capture=no
C:\numpy
is present insys.path
now, thereforeimport numpy
will importnumpy
not fromC:\numpy\\build-install\\usr\\Lib\\site-packages
as it's set byPYTHONPATH
environment variable but fromC:\numpy
which is not intended since-P
is provided: BUG: Error runningspin mypy
from the repository folder numpy/numpy#26816Example of how
-P
option usually worksThe text was updated successfully, but these errors were encountered: