fixbug: WriteTest failed

This commit is contained in:
莘权 马 2023-12-25 13:18:45 +08:00
parent 780caf011d
commit 29bbe5752d
2 changed files with 5 additions and 1 deletions

View file

@ -44,7 +44,7 @@ you should correctly import the necessary classes based on these file locations!
class WriteTest(Action):
name: str = "WriteTest"
context: Optional[str] = None
context: Optional[TestingContext] = None
llm: BaseGPTAPI = Field(default_factory=LLM)
async def write_code(self, prompt):

View file

@ -51,3 +51,7 @@ async def test_write_code_invalid_code(mocker):
# Assert that the returned code is the same as the invalid code string
assert code == "Invalid Code String"
if __name__ == "__main__":
pytest.main([__file__, "-s"])