Skip to content

Commit

Permalink
Stop generating unit test for non python files
Browse files Browse the repository at this point in the history
When trying to create a simple HelloWorld with test, metagpt creates
test for README.md
  • Loading branch information
arnaudgelas committed Jan 22, 2024
1 parent b5922d4 commit b4e0934
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions metagpt/roles/qa_engineer.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ async def _write_test(self, message: Message) -> None:
code_doc = await src_file_repo.get(filename)
if not code_doc:
continue
if not code_doc.filename.endswith(".py"):
continue
test_doc = await tests_file_repo.get("test_" + code_doc.filename)
if not test_doc:
test_doc = Document(
Expand Down

0 comments on commit b4e0934

Please sign in to comment.