dc99f1604e
CI / lint-test-build (push) Successful in 54s
- Cleaned up multiline statements and removed unnecessary line breaks in various files. - Ensured consistent formatting in function definitions and calls across the codebase. - Updated docstrings and comments for clarity where applicable. - Removed trailing newlines in module docstrings. - Enhanced logging statements for better clarity in maintenance tasks.
28 lines
763 B
Python
28 lines
763 B
Python
"""pytest configuration for integration tests.
|
|
|
|
Integration tests require a live PostgreSQL server at the configured host.
|
|
They are skipped automatically if the server is unreachable.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import pathlib
|
|
|
|
import pytest
|
|
|
|
|
|
def pytest_ignore_collect(collection_path: pathlib.Path, config: pytest.Config) -> bool:
|
|
"""Skip integration tests unless --integration is passed."""
|
|
if "integration" in str(collection_path) and not config.getoption("--integration", False):
|
|
return True
|
|
return False
|
|
|
|
|
|
def pytest_addoption(parser: pytest.Parser) -> None:
|
|
parser.addoption(
|
|
"--integration",
|
|
action="store_true",
|
|
default=False,
|
|
help="Run integration tests (requires PostgreSQL)",
|
|
)
|