Regression test for dict(message) to message.dict() fix
(self)
| 188 | |
| 189 | class ReplayTester(unittest.TestCase): |
| 190 | def test_replay_with_chatmessage(self): |
| 191 | """Regression test for dict(message) to message.dict() fix""" |
| 192 | logger = AgentLogger() |
| 193 | memory = AgentMemory(system_prompt="test") |
| 194 | step = ActionStep(step_number=1, timing=0) |
| 195 | step.model_input_messages = [ChatMessage(role=MessageRole.USER, content="Hello")] |
| 196 | memory.steps.append(step) |
| 197 | |
| 198 | try: |
| 199 | memory.replay(logger, detailed=True) |
| 200 | except TypeError as e: |
| 201 | self.fail(f"Replay raised an error: {e}") |
| 202 | |
| 203 | |
| 204 | class AgentLoggerLogTaskTester(unittest.TestCase): |
nothing calls this directly
no test coverage detected