[TIP] Export tox commands for non-toxable environments?
holger krekel
holger at merlinux.eu
Thu Nov 29 10:34:26 PST 2012
On Thu, Nov 29, 2012 at 10:02 -0500, Ned Batchelder wrote:
> I'm using tox to run tests on multiple Pythons for coverage.py. But
> tox won't run on 2.3 or 2.4 (I know, ancient), which coverage.py
> still supports. I'd like to be able to export the commands tox
> would run so that I can execute them manually in another
> environment. Something like "tox --dry-run" would be perfect. It
> would output "pip install REQ" for each requirement, and "CMD" for
> each command. Does anything like this exist? Am I missing some
> subtlety that makes this a silly request?
>
> I can probably hack something together by parsing the tox.ini or the
> output of "tox --showconfig", but that seems like the wrong way to
> make it happen.
"tox -v" will show the commands. I think they can be automatically
recognized because unlike other lines, they start with two spaces.
You could also use the "--notest" option to skip all testing commands
but that probably doesn't help you much.
As to a "--dry-run" command, it might be a bit tricky because after virtualenv
creation tox searches PATH, including the virtualenv one, for finding
commands and those would need to be special-cased somehow.
FYI there is also someone interested in/working getting back 2.4 support
by including an older virtualenv version with tox, see
https://bitbucket.org/hpk42/tox/issue/56/
best,
holger
> --Ned.
>
> PS: Is "non-toxic" a better adjective to describe environments tox
> doesn't support? :)
i guess i should have called it "untox" or so :) OTOH i created the
extra package "detox" for running all things in parallel. Apart from
not seeing detailed testing progress i don't know a reason not to use it :)
More information about the testing-in-python
mailing list