Skip to content

Using 'python' in commands is confusing #305

@pytoxbot

Description

@pytoxbot

Another feedback from my fellow sprinters new to tox.

Very often you'll see something like this in your tox.ini:

[testenv:coverage]
basepython = python3
commands =
    python -m coverage run {[coverage]rc} -m nose -v
    python -m coverage combine {[coverage]rc}
    python -m coverage html {[coverage]rc}
    python -m coverage report -m {[coverage]rc}

The details aren't important other than what we're doing here is invoking some python interpreter to run some commands. In the commands lines we see the string "python" and while tox does the right thing by substituting basepython for that, it's confusing when people see it because they think that it's literally using /usr/bin/python (i.e. Python 2) for those commands.

I thought maybe we could use {basepython} -m blah but that doesn't work. Any thoughts on a way to make it obvious the "python" in commands is being substituted instead of actually using Python 2?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions