[pytest]
# Pytest configuration for Patherly backend tests

# Python path - add current directory so 'app' module can be imported
pythonpath = .

# Asyncio configuration
asyncio_mode = auto

# Test discovery patterns
python_files = test_*.py
python_classes = Test*
python_functions = test_*

# Output options
addopts =
    -v
    --strict-markers
    --tb=short
    --cov=app
    --cov-report=term-missing
    --cov-report=html

# Test markers
markers =
    asyncio: marks tests as async
    slow: marks tests as slow (deselect with '-m "not slow"')
    integration: marks tests as integration tests
    unit: marks tests as unit tests
    rls: opt-in RLS migration and policy tests (run with RUN_RLS_TESTS=1)

# Ignore paths
testpaths = tests

# Warnings
filterwarnings =
    error
    ignore::DeprecationWarning
    ignore::PendingDeprecationWarning
    ignore::pluggy.PluggyTeardownRaisedWarning
