openrag/pytest.ini
Edwin Jose 3881c50ad5 Add comprehensive test suite and Makefile targets
Introduces a full test suite under the tests/ directory, including API, service, connector, and utility tests, along with fixtures and documentation. Expands Makefile with granular test commands for unit, integration, API, service, connector, coverage, and quick tests. Adds configuration files for pytest and coverage reporting, and provides a quickstart guide for testing workflow.
2025-10-07 04:41:52 -04:00

52 lines
1.1 KiB
INI

[pytest]
# Pytest configuration for OpenRAG backend tests
# Test discovery patterns
python_files = test_*.py
python_classes = Test*
python_functions = test_*
# Test paths
testpaths = tests
# Output options
addopts =
-v
--tb=short
--strict-markers
--disable-warnings
--cov=src
--cov-report=term-missing
--cov-report=html:htmlcov
--cov-report=xml
--cov-branch
--cov-fail-under=20
# Markers for organizing tests
markers =
unit: Unit tests that test individual components in isolation
integration: Integration tests that test multiple components together
api: API endpoint tests
service: Service layer tests
connector: Connector tests
slow: Slow running tests
requires_opensearch: Tests that require OpenSearch connection
requires_langflow: Tests that require Langflow connection
# Asyncio configuration
asyncio_mode = auto
# Coverage options
[coverage:run]
source = src
omit =
*/tests/*
*/__pycache__/*
*/site-packages/*
*/venv/*
*/.venv/*
[coverage:report]
precision = 2
show_missing = True
skip_covered = False