diff --git a/src/aiida/tools/pytest_fixtures/daemon.py b/src/aiida/tools/pytest_fixtures/daemon.py index 89ef02d841..d838e05833 100644 --- a/src/aiida/tools/pytest_fixtures/daemon.py +++ b/src/aiida/tools/pytest_fixtures/daemon.py @@ -2,6 +2,7 @@ from __future__ import annotations +import logging import pathlib import typing as t @@ -9,6 +10,7 @@ if t.TYPE_CHECKING: from aiida.engine import Process, ProcessBuilder + from aiida.engine.daemon.client import DaemonClient from aiida.orm import ProcessNode @@ -47,7 +49,7 @@ def test(daemon_client): @pytest.fixture -def started_daemon_client(daemon_client): +def started_daemon_client(daemon_client: 'DaemonClient'): """Ensure that the daemon is running for the test profile and return the associated client. Usage:: @@ -60,11 +62,14 @@ def test(started_daemon_client): daemon_client.start_daemon() assert daemon_client.is_daemon_running + logger = logging.getLogger('tests.daemon:started_daemon_client') + logger.debug(f'Daemon log file is located at: {daemon_client.daemon_log_file}') + yield daemon_client @pytest.fixture -def stopped_daemon_client(daemon_client): +def stopped_daemon_client(daemon_client: 'DaemonClient'): """Ensure that the daemon is not running for the test profile and return the associated client. Usage::