base_python
settings may break ignore_base_python_conflict = false
behaviour
#3189
Labels
help:wanted
Issues that have been acknowledged, a solution determined and a PR might likely be accepted.
Issue
According to the documentation:
This is unfortunately not always true.
When
base_python
is unset for an environment, tox will setbase_python
to thepy*
factor from the environment name and the check described above works fine. For a configuration such as:we can examine the
tox config
output and see that it includes the following:However, if we append the following to the above configuration (so it's in the
[testenv]
section:examining the
tox config
output shows that tox has now leftbase_python
unset (or perhaps set to an empty string?) for environments with any otherpy*
factor, such aspy3.9
:Running the tests confirms that tox is quietly changing the Python interpreter for
py3.9
to the version used by tox itself, Python 3.11, and carrying on with the testing as if nothing is wrong:Note that the test failure here is due to my test being
./check-py-ver
, which compares the Python version being used to thepy*
factor in$TOX_ENV_NAME
; tests that don't explicitly make such a comparison run fine and pass.Environment
The current test case I'm using is my pytest_pt project; the simplified cases above are derived from that and running just two test cases with
./Test -e py3.8-pytest7,py3.9-pytest7
. The first case is with thetox.ini
file as is, and the second with the minor tweak described above. I think that the problem should be quite reproducible from the information above or pytest_pt, but I can probably cons up a smaller test case if necessary.The text was updated successfully, but these errors were encountered: