Add a pid file to avoid running honcho multiple times

This commit is contained in:
2025-02-26 10:42:11 +01:00
parent aa66fc61ab
commit e542fe11b9
4 changed files with 59 additions and 12 deletions

View File

@ -1,3 +1,5 @@
import atexit
import pytest
from .composer import start_composer, stop_composer
@ -15,7 +17,4 @@ def pytest_load_initial_conftests(early_config, parser, args):
"""Hook that loads the composer before the pytest-django plugin"""
if PROCFILE_PYTEST is not None:
start_composer(PROCFILE_PYTEST)
def pytest_unconfigure(config):
stop_composer()
_ = atexit.register(stop_composer)