Merge pull request #1573 from voidking/main

bugfix: At least 8 rounds are required to run all QA actions
This commit is contained in:
Alexander Wu 2024-11-06 16:49:48 +08:00 committed by GitHub
commit f11e671217
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 23 additions and 1 deletions

View file

@ -60,6 +60,8 @@ def generate_repo(
if run_tests:
company.hire([QaEngineer()])
if n_round < 8:
n_round = 8 # If `--run-tests` is enabled, at least 8 rounds are required to run all QA actions.
else:
stg_path = Path(recover_path)
if not stg_path.exists() or not str(stg_path).endswith("team"):

File diff suppressed because one or more lines are too long

View file

@ -30,5 +30,12 @@ def test_software_company(new_filename):
logger.info(result.output)
def test_software_company_with_run_tests():
args = ["Make a cli snake game", "--run-tests", "--n-round=8"]
result = runner.invoke(app, args)
logger.info(result.output)
assert "unittest" in result.output.lower() or "pytest" in result.output.lower()
if __name__ == "__main__":
pytest.main([__file__, "-s"])