from trace_commentor import flags, Commentor def asserteq_or_print(value, ground_truth): if flags.DEBUG or flags.PRINT: print(value) else: assert value == ground_truth.strip("\n"), "\n".join(["\n\n<<<<<<<< VALUE", value, "========================", ground_truth.strip("\n"), ">>>>>>>> GROUND\n"])