Skip to main content

A tox plugin to run an arbitrary command in a tox managed virtualenv.

Example:

tox -e py27 --run-command "server --port 8080"

In the example tox will will run server --port 8080 inside of the py27 virualenv.

Notes:

  • Any env defined in your tox.ini will work

  • The env will be created if it doesn’t exist (just like tox normally does)

  • The commands from your tox.ini will not be run and instead the command you wanted to run is run

  • tox substitutions will also work. (e.g. tox -e py27 --run-command "server --config={homedir}/server.conf")

Why?

Almost all of the projects I work on use tox for test automation. Many of those projects, one such example is Keystone, carry custom Python and/or shell scripts to create virtualenvs to run server processes for manual testing. Other projects advise the developer to create a tox virtualenv by running tox -e py27 --notest and then running the server from within that virtualenv like .tox/py27/bin/server --port 8080.

Both of those options suck. Since I couldn’t find a tool that already existed to do this, I created one using the new tox plugin API.

Release files for tox-run-command 0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tox-run-command 0.4
File Size Uploaded
tox-run-command-0.4.tar.gz 2.3 kB Details

Release files / tox-run-command-0.4.tar.gz

Download URL tox-run-command-0.4.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5c5fe892f732d20276c8b2d29ce079bbbcadc153d696b31cdd8fb3edf5c29ec6
BLAKE2b-256 checksum
How to use checksums
0a2f1aa1b8edf308d6a62c1234759859fb10292e96595e4595cb47558347ed80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.4 This release

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page