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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytest-forked-0.2.tar.gz.
File metadata
- Download URL: pytest-forked-0.2.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4500cd0509ec4a26535f7d4112a8cc0f17d3a41c29ffd4eab479d2a55b30805
|
|
| MD5 |
133167c9c56c9121c80852f9cd702140
|
|
| BLAKE2b-256 |
b3b21ec910b0f798cc86f2531631d7a2da030b16c165e07545537332fd4eb505
|
File details
Details for the file pytest_forked-0.2-py2.py3-none-any.whl.
File metadata
- Download URL: pytest_forked-0.2-py2.py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f275cb48a73fc61a6710726348e1da6d68a978f0ec0c54ece5a5fae5977e5a08
|
|
| MD5 |
b7c663a158ed861f7c4faa4edc45225d
|
|
| BLAKE2b-256 |
dd9dfb75af584b850a902c9ce5ec96ea5c623978113b8a240ab414e1a435df93
|