multi-line factor specification in generated environments are not supported

Issue #213 on hold
Barry Warsaw created an issue

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.

Comments (6)

  1. Holger Krekel repo owner

    If we want to extend the current factor-syntax to support multi-line i suggest we do:

    coverage: single-line
    
    coverage:
       multi-line1
       multi-line2
    

    This is reminiscient of the python syntax and should be backward-compatible. Maybe @suor has additional thoughts.

  2. Barry Warsaw reporter

    On Feb 04, 2015, at 03:11 PM, holger krekel wrote:

    Yep, in fact that's exactly the syntax I was using, until I realized it wasn't working. :)

    --- you can reply above this line ---

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

    holger krekel:

    If we want to extend the current factor-syntax to support multi-line i suggest we do:

    ``` #!python

    coverage: single-line

    coverage: ``` This is reminiscient of the python syntax and should be backward-compatible. Maybe @suor has additional thoughts.

    --

    Unwatch this issue to stop receiving email updates: https://bitbucket.org/api/1.0/hpk42/tox/issue/213/unwatch/warsaw/60f6f70d5608bc37266abe9f73eafc8d349e4e7a/

  3. Holger Krekel repo owner

    I am not sure what it would take to introduce the syntax, probably not too much. Open for PRs.

  4. Log in to comment