Add a way to generate a report after the tests in the same command

This commit is contained in:
Roch Bertucat
2020-12-10 10:35:13 +01:00
parent 2ac0b75dbc
commit 860d795ba1
+8
View File
@@ -42,6 +42,12 @@ if __name__ == "__main__":
action="store_true", action="store_true",
help="Generate a HTML report" help="Generate a HTML report"
) )
parser.add_argument(
"-rr",
"--report_after_run",
action="store_true",
help="Generate a HTML report after running the tests"
)
parser.add_argument( parser.add_argument(
"-c", "-c",
"--console", "--console",
@@ -103,4 +109,6 @@ if __name__ == "__main__":
show_widget(args["featuresdir"], args["ifcfile"]) show_widget(args["featuresdir"], args["ifcfile"])
else: else:
run.run_tests(args) run.run_tests(args)
if args["report_after_run"]:
reports.generate_report()
print("# All tasks are complete :-)") print("# All tasks are complete :-)")