refactor: update tests to use async mocks and improve readability
CI / lint-test-build (push) Failing after 12s

This commit is contained in:
2026-06-07 15:05:42 +02:00
parent ef22e217c7
commit af0ac94a12
5 changed files with 251 additions and 346 deletions
+9 -3
View File
@@ -6,12 +6,18 @@ They are skipped automatically if the server is unreachable.
from __future__ import annotations
import pathlib
import pytest
def pytest_ignore_collect(path: str, config: pytest.Config) -> bool:
def pytest_ignore_collect(
collection_path: pathlib.Path, config: pytest.Config
) -> bool:
"""Skip integration tests unless --integration is passed."""
if "integration" in path and not config.getoption("--integration", False):
if "integration" in str(collection_path) and not config.getoption(
"--integration", False
):
return True
return False
@@ -22,4 +28,4 @@ def pytest_addoption(parser: pytest.Parser) -> None:
action="store_true",
default=False,
help="Run integration tests (requires PostgreSQL)",
)
)