I ran into a unique issue while writing test cases with pytest
If we write a test as:-
a = 4
b = 5
c = 4
def match_test():
assert a == (b or c) # (fails with `AssertionError`)
Now if we do the same using constants
def match_test():
assert a == (4 or 5) (passes)
But passes if we breakdown the assert as:-
def match_test():
assert a == b or a == c # (passed)
The same happens with strings, curious if anyone can explain why this unique behaviour, PS I am new to Pytest
and assert
statements.