run tests in isolated forked subprocesses
Project description
--forked: (not available on Windows) run each test in a forked subprocess to survive SEGFAULTS or otherwise dying processes
Installation
Install the plugin with:
pip install pytest-forked
or use the package in develope/in-place mode with a checkout of the pytest-forked repository
pip install -e .
Usage examples
If you have tests involving C or C++ libraries you might have to deal with tests crashing the process. For this case you may use the boxing options:
py.test --forked
which will run each test in a subprocess and will report if a test crashed the process. You can also combine this option with running multiple processes via pytest-xdist to speed up the test run and use your CPU cores:
py.test -n3 --forked
this would run 3 testing subprocesses in parallel which each create new forked subprocesses for each test.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pytest_forked-0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f275cb48a73fc61a6710726348e1da6d68a978f0ec0c54ece5a5fae5977e5a08 |
|
MD5 | b7c663a158ed861f7c4faa4edc45225d |
|
BLAKE2b-256 | dd9dfb75af584b850a902c9ce5ec96ea5c623978113b8a240ab414e1a435df93 |