Files
MajoorWaldi-ComfyUI-Majoor-…/tests/conftest.py
T
Ewald 00ee7806f7 feat: Add tool detection helpers for ExifTool and FFprobe
- Implemented caching for tool availability and versions.
- Added functions to check for ExifTool and FFprobe availability.
- Included version satisfaction checks against minimum required versions.
- Created utility functions for parsing boolean and float values from environment variables.
- Introduced shared utilities for error message sanitization and logging with emoji indicators.
- Established a Result pattern for error handling without exceptions.
- Added scan throttling helpers to manage background scans efficiently.
- Implemented time utilities for timestamps and performance measurement.
- Defined shared types, enums, and constants for consistent error handling and file classification.
- Created version management utilities to retrieve version information from pyproject.toml.
- Developed installation script for runtime dependencies.
- Added tests for ExifTool batch processing and various configuration scenarios.
- Implemented tests for version route aliases and runtime output root configuration.
2026-02-12 17:55:28 +01:00

26 lines
577 B
Python

import sys
import pytest_asyncio
from .repo_root import REPO_ROOT
if str(REPO_ROOT) not in sys.path:
sys.path.insert(0, str(REPO_ROOT))
@pytest_asyncio.fixture
async def services(tmp_path):
from mjr_am_backend.deps import build_services
db_path = str(tmp_path / "test_services.db")
# build_services is now async
svc_res = await build_services(db_path)
assert svc_res.ok, svc_res.error
svc = svc_res.data
try:
yield svc
finally:
try:
await svc.get("db").aclose()
except Exception:
pass