paper-dynasty-discord/tests/conftest.py
Cal Corum 3debfd6e82 Catchup commit
Includes discord_ui refactor, testing overhaul, addition of
2025-07-22 09:22:19 -05:00

19 lines
660 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)