[Pytest-commit] Issue #213: multi-line factor specification in generated environments are not supported (hpk42/tox)

Barry Warsaw issues-reply at bitbucket.org
Mon Feb 2 20:52:53 CET 2015


New issue 213: multi-line factor specification in generated environments are not supported
https://bitbucket.org/hpk42/tox/issue/213/multi-line-factor-specification-in

Barry Warsaw:

I had something like the following in my tox.ini:


```
#!
[tox]
envlist = {py34,coverage}-{udm,curl}
recreate = True

[testenv]
commands =
    py34: python -m nose2 -v
    coverage: python /usr/bin/python3-coverage run {[coverage]rc} -m nose2 -v
        python3-coverage combine {[coverage]rc}
        python3-coverage html {[coverage]rc} {[coverage]dir}

```

But `tox -e py34-curl` ended up running all four commands.  I thought the coverage: commands would only be run for coverage-* envs but factor specifications cannot span multiple lines.  Changing this to:


```
#!

[testenv]
commands =
    py34: python -m nose2 -v
    coverage: python /usr/bin/python3-coverage run {[coverage]rc} -m nose2 -v
    coverage: python3-coverage combine {[coverage]rc}
    coverage: python3-coverage html {[coverage]rc} {[coverage]dir}

```

seemed to do the trick.  Maybe this is just a documentation issue.




More information about the pytest-commit mailing list