Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Incorrectly dropping brackets on display of assertions #925
If I have the following test:
def test_ternary_display(): assert (False == False) == False
then this will correctly fail, but will display as:
This is wrong. The brackets are required because "False == False == False" evaluates to True. In Python this is the same as "(False == False) and (False == False)" due to the rules about chaining operators.