fixbug: tests

This commit is contained in:
莘权 马 2023-08-01 10:48:26 +08:00
parent 85c7148b62
commit d415ca5dbc
7 changed files with 15 additions and 17 deletions

View file

@ -10,6 +10,7 @@ from pathlib import Path
import aiofiles
from metagpt.actions.write_teaching_plan import WriteTeachingPlanPart, TeachingPlanRequirement
from metagpt.const import WORKSPACE_ROOT
from metagpt.roles import Role
from metagpt.schema import Message
from metagpt.logs import logger
@ -59,7 +60,7 @@ class Teacher(Role):
async def save(self, content):
"""Save teaching plan"""
filename = Teacher.new_file_name(self.course_title)
pathname = Path(__file__).resolve().parent.parent.parent / "output"
pathname = WORKSPACE_ROOT / "output"
pathname.mkdir(exist_ok=True)
pathname = pathname / filename
try: