Run Black formatter across 83 files and fix 1514 ruff violations: - E722: bare except → typed exceptions (17 fixes) - E711/E712/E721: comparison style fixes with noqa for SQLAlchemy (44 fixes) - F841: unused variable assignments (70 fixes) - F541/F401: f-string and import cleanup (1383 auto-fixes) Remaining 925 errors are all F403/F405 (star imports) — structural, requires converting to explicit imports in a separate effort. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
23 lines
664 B
Python
23 lines
664 B
Python
"""
|
|
Global pytest configuration for all tests.
|
|
Sets up Docker environment for testcontainers.
|
|
"""
|
|
|
|
import os
|
|
import pytest
|
|
|
|
|
|
def pytest_configure(config):
|
|
"""Configure pytest with required environment variables."""
|
|
# Set Docker socket for testcontainers
|
|
if not os.getenv("DOCKER_HOST"):
|
|
os.environ["DOCKER_HOST"] = "unix:///home/cal/.docker/desktop/docker.sock"
|
|
|
|
|
|
def pytest_collection_modifyitems(config, items):
|
|
"""Add markers to tests that use testcontainers."""
|
|
for item in items:
|
|
# Add slow marker to tests that use database fixtures
|
|
if "session" in item.fixturenames:
|
|
item.add_marker(pytest.mark.slow)
|