+ success = "uncovered"
+ else:
+ success = "covered"
+ objects_covered += 1
+ object_html += object_row.format("%s[%d]" % (obj_name, j), success)
+ objects_percent = round((objects_covered / objects_total) * 100, 1)
+
+ # output some quick report stats
+ print("\nadventure.yaml coverage rate:")
+ print(" locations..........: {}% covered ({} of {})".format(location_percent, location_covered, location_total))
+ print(" arbitrary_messages.: {}% covered ({} of {})".format(arb_percent, arb_covered, arb_total))
+ print(" objects............: {}% covered ({} of {})".format(objects_percent, objects_covered, objects_total))
+
+ # render HTML report
+ with open(html_output_path, "w") as f:
+ f.write(html_template.format(
+ location_total, location_covered, location_percent,
+ arb_total, arb_covered, arb_percent,
+ objects_total, objects_covered, objects_percent,
+ location_html, arb_msg_html, object_html
+ ))