Skip to main content

A simple plugin to use with pytest

Project description


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.


pip install pytest-bg-process


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-log:
    • Path to save log data of the background process.
    • Default: background.log


Using background-cmd


Using background-cmd-env



REDIS_CMD=redis-server && pytest

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest-bg-process-0.0.1.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

pytest_bg_process-0.0.1-py3-none-any.whl (3.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page