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

Let `tox --listenvs` list all defined environments, not only from `envlist` in `[tox]` section #271

Closed
pytoxbot opened this Issue Sep 17, 2016 · 5 comments

Comments

Projects
None yet
4 participants
@pytoxbot

pytoxbot commented Sep 17, 2016

Issue #52 asks for having a command to list all configured environments.

However, I found, that it lists only those environments, which are in envlist.

If I do not want to run some of the environments when tox is invoked without any argument, I keep the envlist in [tox] shorter. However, this does not print it out when::

$ tox -l

It would be nice to list all existing environments.

tox version: 2.1.1

OS: Debian Jessie

Python 2.7.9

Sample tox.ini:

#!ini

# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.

[tox]
envlist = help
skipsdist = true

[testenv:help]
basepython = python2.7
commands = python -c "print(open('tox.help').read());" 
deps =

[testenv:docs]
basepython = python2.7
whitelist_externals =
    make
changedir = docs
commands = make html
deps = 
    -rrequirements-docs.txt

[testenv:testsamples]
basepython = python2.7
envdir = {toxworkdir}/test
commands = py.test -sv tests/test_samples.py
deps =
    -rrequirements-json.txt

[testenv:testschema]
basepython = python2.7
envdir = {toxworkdir}/test
commands = py.test -sv tests/test_schema.py
deps =
    -rrequirements-json.txt

[testenv:testyaml]
basepython = python2.7
envdir = {toxworkdir}/test
commands = py.test -sv tests/test_sample.py --yamlsample []
deps =
    -rrequirements-json.txt

[testenv:testjson]
basepython = python2.7
envdir = {toxworkdir}/test
commands = py.test -sv tests/test_sample.py --jsonsample []
deps =
    -rrequirements-json.txt

For given tox.ini it lists only help:

#!bash

$ tox --listenvs
help

and I would like to see there all:

#!bash

$ tox --listenvs
help
docs
testsamples
testschema
testyaml
testjson
@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by @obestwalter

+1 That is actually what I as a tox user would expect tox --listenvs to print out.

@volans-

This comment has been minimized.

volans- commented Feb 15, 2017

+1, how a user could discover an environment not run by default?

@obestwalter

This comment has been minimized.

Member

obestwalter commented Feb 15, 2017

how a user could discover an environment not run by default?

Until this issue is resolved only by looking for all [testenv:???]sections directly in the tox.ini of the project .

gaborbernat added a commit to gaborbernat/tox that referenced this issue Mar 21, 2017

@gaborbernat

This comment has been minimized.

Member

gaborbernat commented Mar 21, 2017

created an implementation for this based on top of #489, I'll create the PR once that gets accepted 👍

gaborbernat added a commit to gaborbernat/tox that referenced this issue Mar 21, 2017

gaborbernat added a commit to gaborbernat/tox that referenced this issue Mar 27, 2017

gaborbernat added a commit to gaborbernat/tox that referenced this issue Mar 27, 2017

gaborbernat added a commit to gaborbernat/tox that referenced this issue Mar 27, 2017

[tox-dev#271] rework listenv for backward compatbility
- -l alone displays only default enviroments
- -a dispalys all enviroments (default and extra)
- when -v (verbosity) is set to at least 1 descriptions are also
  displayed

gaborbernat added a commit to gaborbernat/tox that referenced this issue Mar 28, 2017

[tox-dev#271] rework listenv for backward compatbility
- -l alone displays only default enviroments
- -a dispalys all enviroments (default and extra)
- when -v (verbosity) is set to at least 1 descriptions are also
  displayed

gaborbernat added a commit to gaborbernat/tox that referenced this issue Mar 28, 2017

[tox-dev#271] rework listenv for backward compatbility
- -l alone displays only default enviroments
- -a dispalys all enviroments (default and extra)
- when -v (verbosity) is set to at least 1 descriptions are also
  displayed

gaborbernat added a commit to gaborbernat/tox that referenced this issue Mar 30, 2017

[tox-dev#271] rework listenv for backward compatbility
- -l alone displays only default enviroments
- -a dispalys all enviroments (default and extra)
- when -v (verbosity) is set to at least 1 descriptions are also
  displayed

obestwalter added a commit that referenced this issue Apr 1, 2017

Merge pull request #495 from gaborbernat/all_env
[#271] show all defined enviroments for listenv, not just what's in envlist
@obestwalter

This comment has been minimized.

Member

obestwalter commented Apr 1, 2017

fixed in #495

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment