Yelp/Testify — pull request #29 by sumeet (2011-10-24 23:14:28+00:00)
Title: Format `assert_equal`'s message for readability.

Add line breaks in the ouptut and show an inter-
line diff for LHS and RHS.

Before:

```
Traceback (most recent call last):
File "/Users/sumeet/Testify/testify/test_case.py", line 373, in __execute_block_recording_exceptions
block_fxn()
File "a_test.py", line 10, in test_compare_strings
'so look this is a real1y long string can you easily what changed??')
File "/Users/sumeet/Testify/testify/assertions.py", line 32, in assert_equal
assert lval == rval, "assertion failed: %r == %r" % (lval, rval)
AssertionError: assertion failed: 'so look this is a really long string can you easily tell what changed???' == 'so look this is a real1y long string can you easily what changed??'
```

After:

```
Traceback (most recent call last):
File "/Users/sumeet/Testify/testify/test_case.py", line 373, in __execute_block_recording_exceptions
block_fxn()
File "a_test.py", line 10, in test_compare_strings
'so look this is a real1y long string can you easily what changed??')
File "/Users/sumeet/Testify/testify/assertions.py", line 50, in assert_equal
(lval, rval, _diff_message(lval, rval))
AssertionError: assertion failed: l == r

l: 'so look this is a really long string can you easily tell what changed???'
r: 'so look this is a real1y long string can you easily what changed??'

Diff:
l: so look this is a real
y long string can you easily what changed??
r: so look this is a real<1>y long string can you easily <>what changed??<>
```