feat: add proper optional-dependencies for each modules (#75)

This commit is contained in:
d3vyce
2026-02-19 11:08:18 +01:00
committed by GitHub
parent 48567310bc
commit 32ed36e102
8 changed files with 346 additions and 29 deletions

View File

@@ -1,13 +1,24 @@
"""Pytest helpers for FastAPI testing: sessions, clients, and fixtures."""
from .plugin import register_fixtures
from .utils import (
cleanup_tables,
create_async_client,
create_db_session,
create_worker_database,
worker_database_url,
)
try:
from .plugin import register_fixtures
except ImportError:
from .._imports import require_extra
require_extra(package="pytest", extra="pytest")
try:
from .utils import (
cleanup_tables,
create_async_client,
create_db_session,
create_worker_database,
worker_database_url,
)
except ImportError:
from .._imports import require_extra
require_extra(package="httpx", extra="pytest")
__all__ = [
"cleanup_tables",