test python code example
Example 1: python testing
>>> assert sum([1, 2, 3]) == 6, "Should be 6"
Example 2: self.assertequal python
'''
In other words, assertEquals is a function to check if two variables are equal, for purposes of automated testing:
'''
def assertEquals(var1, var2):
if var1 == var2:
return True
else:
return False
Example 3: python online test
YOU CAN RUN YOUR PYTHON CODE IN W3SCHOOLS PYTHON