Substitution breaks for commands substitution

Issue #120 on hold
Hynek Schlawack created an issue

Since there doesn’t seem to be a way to describe several environments at once like [testenv:py32,py33] or just [testenv:py3] (please correct me if I’m wrong :)) I would like to substitute commands but when I do this:

commands = py.test --cov structlog --cov-config=.coveragerc.py3

commands = {[testenv:py32]commands}

I’ll get

ERROR: InvocationError: could not find executable 'py.test --cov structlog --cov-config=.coveragerc.py3'

If I copy and paste the command line, it works fine.

My guess is that it tries to treat the whole command line as the executable instead of just py.test and splitting the rest as arguments?

Comments (7)

  1. Holger Krekel repo owner

    fix issue #120: section subs in commands doesn't work


    Section substitution for commands doesn't work correctly.


    When section substitution is specified as a single form of commands declaration it is replaced with parsed list of commands.

    When section substation happens as part of the other command line declaration - preserve original behaviour.


    • fixes for the issue
    • some PEP8 violations are fixed
    • tests for the substation in commands are grouped

    → <<cset d13a94a309b8>>

  2. Log in to comment