[Pytest-commit] Issue #303: testenv:cutom does not respect envlist? (hpk42/tox)
tbaldman
issues-reply at bitbucket.org
Fri Jan 8 11:21:12 EST 2016
New issue 303: testenv:cutom does not respect envlist?
https://bitbucket.org/hpk42/tox/issues/303/testenv-cutom-does-not-respect-envlist
tbaldman:
Hello,
I have been scratching my head over this. Consider the following tox.ini file:
```
[tox]
envlist = py34
[testenv]
setenv =
DJANGO_SETTINGS_MODULE={env:DJANGO_SETTINGS_MODULE_TEST:snom_cms.settings.base}
PYTHONPATH = {toxinidir}/snom_cms
[testenv:teamcity]
deps =
-r{toxinidir}/REQUIREMENTS
{[testenv]deps}
wheel
teamcity-messages
```
invoking this:
```
tox
```
creates a python3.4 environment as expected.
However, invoking this:
```
tox -e teamcity
```
Creates a 2.7 instead.
Now, I could fix it with:
```
[testenv:teamcity]
basepython = python3.4
deps =
```
but I don't understand how this can be. More to the point, setting basepython for the testenv like this:
```
[testenv]
basepython = python3.4
setenv =
DJANGO_SETTINGS_MODULE={env:DJANGO_SETTINGS_MODULE_TEST:snom_cms.settings.base}
PYTHONPATH = {toxinidir}/snom_cms
```
will solve the issue as well (but why?), but when I try to be more exact for multiple pythons like this:
```
[testenv]
basepython =
py34: python3.4
py26: python2.7
```
I end up with the following exception.
teamcity: InterpreterNotFound:
So, my question (or possibly bug report), is under which conditions this may happen and how to go around that.
...
More information about the pytest-commit
mailing list