Add basic test for log_step_metadata method

- Implemented test_log_step_metadata_basic to verify the correct logging of step metadata including step_id, timestamp, tokens, and memory usage.
- Confirmed that the token counts for total are accurately logged.
pull/615/head
Sambhav Dixit 2 months ago committed by GitHub
parent ef58dd4582
commit 4d300fccf9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -22,3 +22,15 @@ class TestAgentLogging(unittest.TestCase):
short_memory=self.mock_short_memory,
long_term_memory=self.mock_long_memory
)
def test_log_step_metadata_basic(self):
log_result = self.agent.log_step_metadata(1, "Test prompt", "Test response")
self.assertIn('step_id', log_result)
self.assertIn('timestamp', log_result)
self.assertIn('tokens', log_result)
self.assertIn('memory_usage', log_result)
self.assertEqual(log_result['tokens']['total'], 200)

Loading…
Cancel
Save