Only run full procfile on runserver

This commit is contained in:
2025-03-04 11:59:35 +01:00
parent 728ad157e9
commit 75c4c55a32
9 changed files with 19 additions and 17 deletions

View File

@ -3,7 +3,7 @@ import atexit
import pytest
from .composer import start_composer, stop_composer
from .settings import PROCFILE_PYTEST
from .settings import PROCFILE_MINIMAL
# it's the first hook loaded by pytest and can only
# be defined in a proper pytest plugin
@ -15,6 +15,6 @@ from .settings import PROCFILE_PYTEST
@pytest.hookimpl(tryfirst=True)
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)
if PROCFILE_MINIMAL is not None:
start_composer(PROCFILE_MINIMAL)
_ = atexit.register(stop_composer)