Skip to content
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

tox cannot be started on itself with twice the same environment ( tox -e py27,py27) #111

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

Comments

@pytoxbot
Copy link

I am not sure it should run the same environment twice, but it should not throw an error:

$ tox -e py27,py27
GLOB sdist-make: /data1/src/tox.test/setup.py
py27 recreate: /data1/src/tox.test/.tox/py27
py27 installdeps: pytest>=2.3.5
py27 inst: /data1/src/tox.test/.tox/dist/tox-1.6.0.dev2.zip
py27 runtests: commands[0] | py.test --junitxml=/data1/src/tox.test/.tox/py27/log/junit-py27.xml
============================= test session starts =============================
platform linux2 -- Python 2.7.3 -- pytest-2.3.5
tox comes from: '/data1/src/tox.test/.tox/py27/local/lib/python2.7/site-packages/tox/__init__.pyc'
collected 159 items 

<snip>
tests/test_z_cmdline.py .................................

---- generated xml file: /data1/src/tox.test/.tox/py27/log/junit-py27.xml -----
=================== 157 passed, 2 skipped in 79.87 seconds ====================
py27 inst: /data1/src/tox.test/.tox/dist/tox-1.6.0.dev2.zip
Traceback (most recent call last):
  File "/usr/local/bin/tox", line 9, in <module>
    load_entry_point('tox==1.6.0.dev2', 'console_scripts', 'tox')()
  File "/data1/src/tox.test/tox/_cmdline.py", line 26, in main
    retcode = Session(config).runcommand()
  File "/data1/src/tox.test/tox/_cmdline.py", line 301, in runcommand
    return self.subcommand_test()
  File "/data1/src/tox.test/tox/_cmdline.py", line 420, in subcommand_test
    self.runtestenv(venv)
  File "/data1/src/tox.test/tox/_cmdline.py", line 428, in runtestenv
    venv.test(redirect=redirect)
  File "/data1/src/tox.test/tox/_venv.py", line 328, in test
    message = "commands[%s] | %s" % (i, ' '.join(argv))
TypeError: sequence item 0: expected string, LocalPath found

This was tested on a fresh clone of tox:

changeset:   484:d31aad39e16f
tag:         tip
user:        Matt Good <matt@matt-good.net>
date:        Wed Aug 07 09:13:48 2013 -0700
summary:     Compute skipsdist default at config parse time
@pytoxbot
Copy link
Author

Original comment by @hpk42

fix issue109 and fix issue111: multiple "-e" options are now combined
(previously the last one would win). Thanks Anthon van der Neut.

→ <<cset 3be5bca16f8b>>

@pytoxbot
Copy link
Author

Original comment by @hpk42

dash_e: fixes #109 and #111

Behaviour of -e has not changed, but can be set by passing True or False
as a parameter multi_dash_e to tox/_config.py: prepare_parse()

This parameter should come from a user specifyable default value
for backwards compatibility. Default should preferable be True after
that is implemented.

_split_env() was factored out of class parseini to enable testing

The issue #111: error on specifying same env twice ("tox -e py27,py27")
fixed. Multiple specifications of the same environment result in
multiple invocation (this could also be selectable in a
configuration file)

→ <>

@pytoxbot
Copy link
Author

Original comment by @hpk42

dash_e: fixes #109 and #111

Behaviour of -e has not changed, but can be set by passing True or False
as a parameter multi_dash_e to tox/_config.py: prepare_parse()

This parameter should come from a user specifyable default value
for backwards compatibility. Default should preferable be True after
that is implemented.

_split_env() was factored out of class parseini to enable testing

The issue #111: error on specifying same env twice ("tox -e py27,py27")
fixed. Multiple specifications of the same environment result in
multiple invocation (this could also be selectable in a
configuration file)

→ <<cset 96e1ba41e1c0>>

@pytoxbot
Copy link
Author

Original comment by @hpk42

dash_e: fixes #109 and #111

Behaviour of -e has not changed, but can be set by passing True or False
as a parameter multi_dash_e to tox/_config.py: prepare_parse()

This parameter should come from a user specifyable default value
for backwards compatibility. Default should preferable be True after
that is implemented.

_split_env() was factored out of class parseini to enable testing

The issue #111: error on specifying same env twice ("tox -e py27,py27")
fixed. Multiple specifications of the same environment result in
multiple invocation (this could also be selectable in a
configuration file)

→ <>

@pytoxbot
Copy link
Author

Original comment by @AvdN

This is caused by tox/_venv.py: _pcall updating the list 'args' in place.

@tox-dev tox-dev locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant