refactor: update tests to use async mocks and improve readability
CI / lint-test-build (push) Failing after 12s
CI / lint-test-build (push) Failing after 12s
This commit is contained in:
@@ -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)",
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user