add ut to check code saving

This commit is contained in:
yzlin 2024-02-06 23:57:39 +08:00
parent ee4aba206e
commit ea6c440294
2 changed files with 10 additions and 0 deletions

View file

@ -17,3 +17,7 @@ async def test_code_interpreter(mocker, auto_run):
rsp = await ci.run(requirement)
logger.info(rsp)
assert len(rsp.content) > 0
finished_tasks = ci.planner.plan.get_finished_tasks()
assert len(finished_tasks) > 0
assert len(finished_tasks[0].code) > 0 # check one task to see if code is recorded