Stop generating unit test for non python files

When trying to create a simple HelloWorld with test, metagpt creates
test for README.md
This commit is contained in:
Arnaud Gelas 2024-01-18 20:47:33 +01:00
parent b5922d4979
commit b4e09341b3

View file

@ -65,6 +65,8 @@ class QaEngineer(Role):
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(