LightRAG/tests
BukeLy 288498ccdc test: Convert test_workspace_isolation.py to pytest style
Why this change is needed:
The test file was using a custom TestResults class for tracking test
execution and results, which is not standard practice for pytest-based
test suites. This makes the tests harder to integrate with CI/CD pipelines
and reduces compatibility with pytest plugins and tooling.

How it solves it:
- Removed custom TestResults class and manual result tracking
- Added @pytest.mark.asyncio decorator to all async test functions
- Converted all results.add() calls to standard pytest assert statements
- Added pytest fixture (setup_shared_data) for common test setup
- Removed custom main() runner (pytest handles test discovery/execution)
- Kept all test logic, assertions, and debugging print statements intact

Impact:
- All 11 test functions maintain identical behavior and coverage
- Tests now follow pytest conventions and integrate with pytest ecosystem
- Test output is cleaner and more informative with pytest's reporting
- Easier to run selective tests using pytest's filtering options

Testing:
Verified by running: uv run pytest tests/test_workspace_isolation.py -v
Result: All 11 tests passed in 2.41s
2025-11-17 18:24:52 +08:00
..
test_aquery_data_endpoint.py Fix conditional logic in streaming response parser of unit test 2025-09-27 21:43:46 +08:00
test_curl_aquery_data.sh Fix linting 2025-10-06 04:57:11 +08:00
test_graph_storage.py Refactor workspace handling to use default workspace and namespace locks 2025-11-17 12:54:33 +08:00
test_lightrag_ollama_chat.py clean comments and unused libs 2025-02-18 21:12:06 +01:00
test_postgres_retry_integration.py Refactor PostgreSQL retry config to use centralized configuration 2025-10-10 03:44:13 +08:00
test_workspace_isolation.py test: Convert test_workspace_isolation.py to pytest style 2025-11-17 18:24:52 +08:00
test_write_json_optimization.py Fix empty dict handling after JSON sanitization 2025-11-17 12:54:32 +08:00