trace_commentor/tests/test_utils.py
2024-04-19 14:54:32 +08:00

8 lines
322 B
Python

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"])