-
-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generative section names don't work with empty factor #1636
Comments
Generative factors are not supported within section names AFAIK. This would be a new feature request. What you could do instead is: [tox]
skipsdist = true
[testenv:foo]
commands =
{envpython} -c "print('Hello World')"
[testenv:foo-factor]
commands =
{[testenv:foo]commands}
{envpython} -c "print('Hello World')" |
Yes they are, the problem is just the empty factor (thus making this a bug IMHO, since empty factors work fine elsewhere). This works fine: [tox]
skipsdist = true
[testenv:foo-factor{1,2}]
commands =
factor1: {envpython} -c "print('Factor 1 given')"
factor2: {envpython} -c "print('Factor 2 given')"
{envpython} -c "print('Hello World')"
(output slightly edited for readability) |
A PR is welcomed 👍 |
Released via https://pypi.org/project/tox/3.20.0/ |
Bumps [tox](https://github.com/tox-dev/tox) from 3.19.0 to 3.20.0. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/tox-dev/tox/blob/master/docs/changelog.rst">tox's changelog</a>.</em></p> <blockquote> <h2>v3.20.0 (2020-09-01)</h2> <p>Bugfixes ^^^^^^^^</p> <ul> <li>Allow hyphens and empty factors in generative section name. - by :user:<code>tyagdit</code> <code>[#1636](tox-dev/tox#1636) <https://github.com/tox-dev/tox/issues/1636></code>_</li> <li>Support for PEP517 in-tree build backend-path key in <code>get-build-requires</code>. - by :user:<code>nizox</code> <code>[#1654](tox-dev/tox#1654) <https://github.com/tox-dev/tox/issues/1654></code>_</li> <li>Allow escaping curly braces in setenv. - by :user:<code>mkenigs</code> <code>[#1656](tox-dev/tox#1656) <https://github.com/tox-dev/tox/issues/1656></code>_</li> </ul> <p>Features ^^^^^^^^</p> <ul> <li>Support for comments within <code>setenv</code> and environment files via the <code>files|</code> prefix. - by :user:<code>gaborbernat</code> <code>[#1667](tox-dev/tox#1667) <https://github.com/tox-dev/tox/issues/1667></code>_</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/tox-dev/tox/commit/5c94919b79105eabb0507f6d5e55b60daee11ccc"><code>5c94919</code></a> release 3.20.0</li> <li><a href="https://github.com/tox-dev/tox/commit/8a25fa6bf3e625c0b47659e1652ab55a79d4d1e8"><code>8a25fa6</code></a> Support environment files and comments in setenv (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/1668">#1668</a>)</li> <li><a href="https://github.com/tox-dev/tox/commit/a7903508fa07068b327e15cfdbf8ea330ab78765"><code>a790350</code></a> New formatters</li> <li><a href="https://github.com/tox-dev/tox/commit/d4e6e77ea77cf8b336f38313bef40c80b6771139"><code>d4e6e77</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/1656">#1656</a> from mkenigs/escape-braces-in-setenv</li> <li><a href="https://github.com/tox-dev/tox/commit/8e39dfbb836b6e2e6b2bd637f7b853935e82de3f"><code>8e39dfb</code></a> Spelling fixes (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/1665">#1665</a>)</li> <li><a href="https://github.com/tox-dev/tox/commit/00f6496b756f938db4ddcf040a5192a9e40b16a4"><code>00f6496</code></a> Document allowlist_externals versionadded (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/1663">#1663</a>)</li> <li><a href="https://github.com/tox-dev/tox/commit/3c38762fc6acfd6ca93ddc8607133d3a39e6d25c"><code>3c38762</code></a> Allow escaping curly braces in setenv</li> <li><a href="https://github.com/tox-dev/tox/commit/3453018dab9a0208f64013c2dd357d1be348ffdf"><code>3453018</code></a> Make setup.py test admonition sterner as it is deprecated (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/1660">#1660</a>)</li> <li><a href="https://github.com/tox-dev/tox/commit/4b7f682db872902b542ccaf26d9619c141dfc8ab"><code>4b7f682</code></a> remove broken link to removed pytest-runner documentation (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/1659">#1659</a>)</li> <li><a href="https://github.com/tox-dev/tox/commit/f292f5236a41f7c02ba60dbc14d8e5941be7ea0e"><code>f292f52</code></a> Fix support of the PEP517 backend-path key (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/1655">#1655</a>)</li> <li>Additional commits viewable in <a href="https://github.com/tox-dev/tox/compare/3.19.0...3.20.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tox&package-manager=pip&previous-version=3.19.0&new-version=3.20.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
If I have a
tox.ini
like this:Now I'd like to simplify this to use generative section names. I'd expect to either
testenv:foo{,-factor}
ortestenv:foo-{,factor}
to work. It looks like neither does.This:
results in:
(or an empty run without any commands if
foo-factor
is added toenvlist
), while this:results in:
(as it defines an environment called
foo-
, notfoo
).Am I missing something, or is the currently no way to do this kind of thing?
The text was updated successfully, but these errors were encountered: