def test(value, expected_value, title, description = None): print(title, end=" ") if (value == expected_value): print("[OK]") return print ("[ERROR]") print ("expected", expected_value, ", got", value) if not description is None: print (description)