Skip to main content

tox plugin to run an arbitrary commands in a virtualenv

Project description

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

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tox-run-command-0.1.tar.gz (2.3 kB view details)

Uploaded Source

File details

Details for the file tox-run-command-0.1.tar.gz.

File metadata

File hashes

Hashes for tox-run-command-0.1.tar.gz
Algorithm Hash digest
SHA256 6fbf2592962654118be2f8d127c739ed76d15dda163c2fb7ce39fef8ef29c76a
MD5 5d0d2c88637cb606a55f6c793c7c053c
BLAKE2b-256 400c0ecf37515230992a474f7d9fca6f66fdf226e1c4855874f7394231823e15

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page