A simple plugin to use with pytest
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.1.tar.gz
.
File metadata
- Download URL: pytest-bg-process-0.0.1.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.59.0 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12187eefc237ed480eafbd281c6e556b0d1495c4f9fe50bad6fa41485ad469a8 |
|
MD5 | fe7597251c2c1a43aad11f45eb1abeee |
|
BLAKE2b-256 | d410f3fa9591d3764ed1ac712a9db9458ab90793265fcc46e4a5e8a78822a020 |
File details
Details for the file pytest_bg_process-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: pytest_bg_process-0.0.1-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.59.0 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8b5411b301a6e85a1162d2b9e453497347f8e9f9e0e0a159ff8126b44abf435 |
|
MD5 | 9a45297818d60c200681d991b6c7280d |
|
BLAKE2b-256 | 47d56b024585be3c1da467a97d6634e42761ae0cf81f7439a8349d9c13ca3316 |