-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
The memory_manager and contradiction_agent modules provide essential functionality for Lucidia but currently lack automated tests. Adding unit tests will ensure stability as new features are added.
Proposed work
- Create a
tests/directory in the Lucidia repository and set uppytestas the test runner. - Write tests for the
MemoryManagerclass:- Verify that
load_memoryreturns an empty dictionary when the memory file does not exist or contains malformed JSON. - Test that
save_memorypersists data correctly and thatMemoryManager.get,set, anddeleteoperations work as expected.
- Verify that
- Write tests for the
ContradictionAgentclass:- Confirm that
analyzeappends contradictions to the list and writes them tocontradictions.json. - Test
list_contradictionsandclear_contradictionsto ensure they return and clear the stored contradictions appropriately.
- Confirm that
- Use fixtures or temporary directories to isolate file I/O during tests so that the real memory files are not affected.
Acceptance criteria
- Running
pytestin the Lucidia repository executes all tests and they pass without errors. - Tests cover both typical and edge-case behaviors for memory loading/saving and contradiction logging/clearing.
- Tests run in an isolated environment without modifying existing memory or contradiction files.
- A brief README or comment explains how to run the tests.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels