Negated factor conditions.

Issue #292 on hold
Tai Lee created an issue

I'd like to do something like:

[testenv]
commands =
    cov: coverage run ... runtests.py
    cov: coveralls
    !cov: python runtests.py

Currently I have to declare factor conditions for cov and nocov instead, which means users must always specific either cov or nocov with tox -e. If they forget, tox just reports success without running any command:

[testenv]
commands =
    cov: coverage run ... runtests.py
    cov: coveralls
    nocov: python runtests.py

Comments (6)

  1. Pi Delport

    This would be very handy: I just came here to report exactly the same issue, for the same use case.

    Would a PR implementing the !factor: syntax be acceptable?

  2. Pi Delport

    An implementation of issue #189 might provide another solution to this, by allowing the above to be expressed as a factor-based testenv override:

    [testenv:cov]
    commands =
        coverage run ... runtests.py
        coveralls
    
  3. Hynek Schlawack

    For the record, since Twisted dropped Python 2.6, I was sorely missing a way to say !py26: twisted too. :|

  4. Log in to comment