run tests in isolated forked subprocesses
Project description
This plugin does not work on Windows because there’s no fork support.
--forked: 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-1.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d05c2e6f33cd4422571b2b1bb309720c398b0549cff499e3e4cde661875ab54 |
|
MD5 | 48d8b3644f3a7e4f1483a2702118079e |
|
BLAKE2b-256 | b02a99ec2a8a26c0a911f76ec2a9461ff0e0d97b5b7bd3282de57eca947f39fc |