Tweaked the testurl diff output text.

- Legacy-Id: 6534
This commit is contained in:
Henrik Levkowetz 2013-10-29 22:22:54 +00:00
parent bf75cd1bef
commit 2e6fa148f3

View file

@ -234,11 +234,11 @@ class SimpleUrlTestCase(django.test.TestCase,RealDatabaseTest):
diff_list = list(unified_diff(list0, list1, master or refurl, url, "", "", 0, lineterm=""))
if len(diff_list):
if len(diff_list) > 10:
print "The diff is too long to show in its entirety. Here are the first 10 lines:\n"
print "\n Differences found. The list is too long to show in its entirety.\n Here are the first 10 lines:\n"
print "\n".join(diff_list[:16])
print "..."
else:
print " Differences found:"
print "\n Differences found:"
print "\n".join(unified_diff(list0, list1, master or refurl, url, "", "", 0, lineterm=""))
return False