Apply review comments

This commit is contained in:
2025-02-20 18:38:15 +01:00
parent 7f8304e407
commit aa66fc61ab
8 changed files with 42 additions and 20 deletions

View File

@ -1,10 +1,8 @@
import pytest
from processes.composer import start_composer, stop_composer
from .composer import start_composer, stop_composer
from .settings import PROCFILE_PYTEST
from .environ import env
# pytest-django uses the load_initial_conftest hook
# it's the first hook loaded by pytest and can only
# be defined in a proper pytest plugin
# To use the composer before pytest-django loads
@ -15,8 +13,8 @@ from .environ import env
@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 := env.str("PROCFILE_PYTEST", None)) is not None:
start_composer(procfile)
if PROCFILE_PYTEST is not None:
start_composer(PROCFILE_PYTEST)
def pytest_unconfigure(config):