ft_transcendence/tests/utils.py
2023-11-06 17:26:27 +01:00

10 lines
342 B
Python

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