Commit 0f3af97b authored by Łukasz Nowak's avatar Łukasz Nowak

Easy debugging.

Show sorted list, as sorting does not impact sets equality, and, if possible,
format a list in human readable way.
parent 0f7042a6
......@@ -603,7 +603,12 @@ class ERP5TypeTestCaseMixin(ProcessingNodeTestCase, PortalTestCase):
def failIfDifferentSet(self, a, b, msg=""):
if not msg:
msg='%r != %r' % (a, b)
try:
from pprint import pformat
except ImportError:
msg='%r != %r' % (sorted(a), sorted(b))
else:
msg='\n%s\n!=\n%s' % (pformat(sorted(a)), pformat(sorted(b)))
self.assertEquals(set(a), set(b), msg)
assertSameSet = failIfDifferentSet
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment