Improve debugging of unit tests when SQL statements don't match.

Review Request #8105 — Created April 7, 2016 and submitted — Latest diff uploaded

Information

Django Evolution
master
4ed032b...

Reviewers

The Django Evolution unit tests compare generated SQL statements with a
list of expected statements. When these don't match, there's very little
to go on for debugging.

This extends the debugging abilities by normalizing the generated and
expected SQL statements into a list of lines, showing both, and then
comparing the lists to help show where the differences are. This makes
it much easier to spot where things went wrong when there's a test
failure.

Unit tests pass.

Used this to debug test failures in the Django 1.7+ work.

    Loading...