Pytest plugin to initialize background process
Project description
pytest-bg-process
Pytest plugin to initialize background process.
The process will start once before all the tests using subprocess.Popen and will be killed once all the tests finished.
Installation
pip install pytest-bg-process
Configuration
From pytest configuration:
- background-cmd:
- Path to command to run at background
- Default: None
- background-cmd-env:
- Environmental variable to path to command to run at background.
- Has higher priority than background-cmd.
- Default: None
- background-pid:
- Path to save PID data of the background process.
- Default: background.pid
- background-log:
- Path to save log data of the background process.
- Default: background.log
Example
Using background-cmd
[pytest]
background-cmd=redis-server
background-pid=redis.pid
background-log=redis.log
Using background-cmd-env
[pytest]
background-cmd-env=REDIS_CMD
background-pid=redis.pid
background-log=redis.log
then
REDIS_CMD=redis-server && pytest
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
File details
Details for the file pytest-bg-process-0.0.2.tar.gz
.
File metadata
- Download URL: pytest-bg-process-0.0.2.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab2c57b77b5b2e8b386c0da1a9d7aaa5d98ed78f71c30fa9541c99ea54cce1a4 |
|
MD5 | 197ed0a11eec6aba25e93dc9eff3df72 |
|
BLAKE2b-256 | 6c9b7ca09ee8f5d4d3daf31ec3782f04edc28a932eff018232002fb1fafa0d76 |
File details
Details for the file pytest_bg_process-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: pytest_bg_process-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef0702935495e66fbf6dafd6dbcdad2806ee91c9d6a121809133e3ef37d05cd3 |
|
MD5 | ea712782088fd30d887092b220721148 |
|
BLAKE2b-256 | 8849a08cd14cda6f2c66eab926ba8afb09b9972e524a9de70cb3236181454ade |