mem0
mem0 copied to clipboard
test: add test coverage and test setup for MemoryGraph class
Description
Add comprehensive test coverage for MemoryGraph class
-
Add tests for initialization, search, delete, and get operations
-
Test entity space removal functionality
-
Mock Neo4j and other dependencies appropriately
Type of change
- Add test coverage for MemoryGraph class.
How Has This Been Tested?
- ✅ Unit Tests
tests/memory/test_graph_memory.py::test_memory_graph_initialization PASSED [ 20%]
tests/memory/test_graph_memory.py::test_search_with_filters PASSED [ 40%]
tests/memory/test_graph_memory.py::test_delete_all PASSED [ 60%]
tests/memory/test_graph_memory.py::test_get_all PASSED [ 80%]
tests/memory/test_graph_memory.py::test_remove_spaces_from_entities PASSED [100%]
=============================== 5 passed in 1.27s ================================
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================== 195 passed, 6 skipped, 41 warnings in 5.20s ===================
Checklist:
- ✅ My code follows the style guidelines of this project
- ✅ I have performed a self-review of my own code
- ✅ I have commented my code, particularly in hard-to-understand areas
- ✅ I have made corresponding changes to the documentation
- ✅ My changes generate no new warnings
- ✅ I have added tests that prove my fix is effective or that my feature works
- ✅ New and existing unit tests pass locally with my changes
- ✅ Any dependent changes have been merged and published in downstream modules
- ✅ I have checked my code and corrected any misspellings
Maintainer Checklist
- ✅ Made sure Checks passed
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
James Huang seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.