ragflow/test/unit_test/pytest.ini
hsparks.codes dcfbb2f7f9 feat: Add comprehensive unit test suite for core services
- Add 175+ unit tests covering Dialog, Conversation, Canvas, KB, and Document services
- Include automated test runner script with coverage and parallel execution
- Add comprehensive documentation (README, test results)
- Add framework verification tests (29 passing tests)
- All tests use mocking for isolation and fast execution
- Production-ready for CI/CD integration

Test Coverage:
- Dialog Service: 30+ tests (CRUD, validation, search)
- Conversation Service: 35+ tests (messages, references, feedback)
- Canvas Service: 40+ tests (DSL, components, execution)
- Knowledge Base Service: 35+ tests (KB management, parsers)
- Document Service: 35+ tests (upload, parsing, status)

Infrastructure:
- run_tests.sh: Automated test runner
- pytest.ini: Pytest configuration
- test_framework_demo.py: Framework verification (29/29 passing)
- README.md: Comprehensive documentation (285 lines)
- TEST_RESULTS.md: Test execution results
2025-12-02 10:14:29 +01:00

43 lines
718 B
INI

[pytest]
# Pytest configuration for RAGFlow unit tests
# Test discovery patterns
python_files = test_*.py
python_classes = Test*
python_functions = test_*
# Test paths
testpaths = .
# Markers
markers =
unit: Unit tests (isolated, mocked)
integration: Integration tests (with database)
slow: Slow running tests
asyncio: Async tests
# Output options
addopts =
-v
--strict-markers
--tb=short
--disable-warnings
--color=yes
# Coverage options
[coverage:run]
source = ../../api/db/services
omit =
*/tests/*
*/test_*
*/__pycache__/*
*/venv/*
*/.venv/*
[coverage:report]
precision = 2
show_missing = True
skip_covered = False
[coverage:html]
directory = htmlcov