LightRAG/tests
BukeLy 7d0c356702 fix: correct assert syntax in test_empty_model_suffix to prevent false positives
Why this change is needed:
The test file contained assert statements using tuple syntax `assert (condition, message)`,
which Python interprets as asserting a non-empty tuple (always True). This meant the tests
were passing even when the actual conditions failed, creating a false sense of test coverage.
Additionally, there were unused imports (pytest, patch, MagicMock) that needed cleanup.

How it solves it:
- Fixed assert statements on lines 61-63 and 105-109 to use correct syntax:
  `assert condition, message` instead of `assert (condition, message)`
- Removed unused imports to satisfy linter requirements
- Applied automatic formatting via ruff-format and ruff

Impact:
- Tests now correctly validate the empty model suffix behavior
- Prevents false positive test results that could hide bugs
- Passes all pre-commit hooks (F631 error resolved)

Testing:
- Verified with `uv run pre-commit run --all-files` - all checks pass
- Assert statements now properly fail when conditions are not met
2025-11-20 01:57:47 +08:00
..
conftest.py Add GitHub CI workflow and test markers for offline/integration tests 2025-11-18 11:36:10 +08:00
README_WORKSPACE_ISOLATION_TESTS.md Fix linting 2025-11-18 08:07:54 +08:00
test_aquery_data_endpoint.py Add GitHub CI workflow and test markers for offline/integration tests 2025-11-18 11:36:10 +08:00
test_base_storage_integrity.py style: fix lint errors (trailing whitespace and formatting) 2025-11-20 01:41:23 +08:00
test_curl_aquery_data.sh Fix linting 2025-10-06 04:57:11 +08:00
test_e2e_multi_instance.py test: add comprehensive E2E migration tests for Qdrant and complete unit test coverage 2025-11-20 01:47:09 +08:00
test_embedding_func.py style: fix lint errors (trailing whitespace and formatting) 2025-11-20 01:41:23 +08:00
test_empty_model_suffix.py fix: correct assert syntax in test_empty_model_suffix to prevent false positives 2025-11-20 01:57:47 +08:00
test_graph_storage.py Add GitHub CI workflow and test markers for offline/integration tests 2025-11-18 11:36:10 +08:00
test_lightrag_ollama_chat.py Rename test classes to prevent warning from pytest 2025-11-18 13:33:05 +08:00
test_migration_complete.py fix: add backward compatibility for Qdrant legacy collection detection 2025-11-20 01:43:47 +08:00
test_postgres_migration.py style: fix lint errors (trailing whitespace and formatting) 2025-11-20 01:41:23 +08:00
test_postgres_retry_integration.py Add GitHub CI workflow and test markers for offline/integration tests 2025-11-18 11:36:10 +08:00
test_qdrant_migration.py style: fix lint errors (trailing whitespace and formatting) 2025-11-20 01:41:23 +08:00
test_workspace_isolation.py Fix test to use default workspace parameter behavior 2025-11-18 11:51:17 +08:00
test_write_json_optimization.py Add GitHub CI workflow and test markers for offline/integration tests 2025-11-18 11:36:10 +08:00