Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only emit path to daemon log path in pytest tmp folder #6698

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/aiida/tools/pytest_fixtures/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

from __future__ import annotations

import logging
import pathlib
import typing as t

import pytest

if t.TYPE_CHECKING:
from aiida.engine import Process, ProcessBuilder
from aiida.engine.daemon.client import DaemonClient

Check warning on line 13 in src/aiida/tools/pytest_fixtures/daemon.py

View check run for this annotation

Codecov / codecov/patch

src/aiida/tools/pytest_fixtures/daemon.py#L13

Added line #L13 was not covered by tests
from aiida.orm import ProcessNode


Expand Down Expand Up @@ -47,7 +49,7 @@


@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::
Expand All @@ -60,11 +62,14 @@
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::
Expand Down
Loading