Python/tox, start a process before tests, shut it down when done
integration-testing, pytest, python, tox
Solution
This isn't really a task for `tox`. My recommendation is that you do this in the `setup` functions/methods of the actual unit testing framework (`py.test`, `nose`, `unittests`, ...) you are using with `tox`.
Original poster's comment:
`pytest_configure` and `pytest_unconfigure` in `conftest.py` was a good place to spawn/terminate.
Problem
I'm using Tox to check that the system I'm developing is behaving well when installed in a fresh environment (+ sanity checking the `setup.py` file). However, the system uses a `memcached` server, and ideally I'd like to spawn a new one for every `Tox` run. Is there a preferred way to start programs before tests are run (and shut them down afterwards) or will I need to write a custom runner? Edit: The test runner is `py.test`