Test recalling empty notes.
()
| 59 | |
| 60 | @pytest.mark.asyncio |
| 61 | async def test_empty_notes(): |
| 62 | """Test recalling empty notes.""" |
| 63 | print("\n=== Testing Empty Notes ===") |
| 64 | |
| 65 | with tempfile.NamedTemporaryFile(mode="w", delete=False, suffix=".json") as f: |
| 66 | note_file = f.name |
| 67 | |
| 68 | # Delete the file to test empty state |
| 69 | Path(note_file).unlink() |
| 70 | |
| 71 | try: |
| 72 | recall_tool = RecallNoteTool(memory_file=note_file) |
| 73 | |
| 74 | # Recall empty notes |
| 75 | result = await recall_tool.execute() |
| 76 | assert result.success |
| 77 | assert "No notes recorded yet" in result.content |
| 78 | print(f"Empty notes result: {result.content}") |
| 79 | |
| 80 | print("✅ Empty notes test passed") |
| 81 | |
| 82 | finally: |
| 83 | Path(note_file).unlink(missing_ok=True) |
| 84 | |
| 85 | |
| 86 | @pytest.mark.asyncio |
no test coverage detected