1.3 KiB
1.3 KiB
Context System Tests
This directory contains tests for the Context system. The tests verify Redis-backed history storage, file-system persistence, message management, context management, serialization, concurrency behavior, and error handling.
Files
test_context_system.py: complete pytest suite.test_context_basic.py: basic validation script that does not require pytest.test_context_simple.py: simplified quick-check script.run_context_tests.py: helper script for dependency checks, Redis checks, test execution, and reporting.
Run
Start Redis first:
redis-server
Run the quick validation:
python test/test_context_simple.py
Run the full pytest suite:
pytest test/test_context_system.py -v
Or use the helper runner:
python test/run_context_tests.py
Coverage
- Redis connection and message storage
- File persistence and restore
- Message retrieval, search, and count limits
- Context creation, lookup, batch save, and cleanup
- Serialization and metadata handling
- Concurrent access safety
- Error handling and automatic summaries
Notes
- Tests use Redis DB 13-15 to avoid affecting production data.
- File-system tests use temporary directories and clean up after themselves.
- See TEST_RESULTS.md for the historical result summary.