New assertion logic no longer follows Python short circuit logic
I installed the pre-release 2.1.0.dev4 in our environment (to get the fix for
#47), but it caused a failure in our test suite. The test is still correct, but it appears the way pytest interprets the assertion, it now fails.
A simple test that reproduces the failure is here:
def test_short_circuit(): subject = 1 # sometimes 'var' assert subject == 1 or '$'+subject == '$var'
In our actual test, this test makes perfect sense. If the number doesn't match, it should be a string and will be concatenated properly.
Prior to pytest 2.1.0.dev, this test passes. With 2.1.0.dev4, it fails with a TypeError: cannot concatenate 'str' and 'int' objects.
I'm assigning this initially to Bejamin Peterson as I believe he's most familiar with the new assertion code.
Will it be possible to restore the original assertion code to match the previous, short-circuited behavior?