Commits

Anonymous committed 0c983cd

Changed representation on mismatch to make visual comparison easier.
Instead of sth like

Different values in
''key'': [1, 2, 3, 4, 5, 6, 7, 8] != [1, 2, 3, 6, 5, 6, 7, 8]

now we get

Different values in
'key': [1, 2, 3, 4, 5, 6, 7, 8]
!=
[1, 2, 3, 6, 5, 6, 7, 8]

Comments (0)

Files changed (1)

                 if d_expected[expected_key] != d_received[expected_key]:
                     if not differentKeysLabelShown:
                         msg += "Different values in"+os.linesep
-                    msg += "'%s':  %s != %s " % (   repr(expected_key),
-                                                    repr(d_expected[expected_key]),
-                                                    repr(d_received[expected_key])) + os.linesep
+                    expected_key_str = repr(expected_key)
+                    filler_str = ' ' * len(expected_key_str)
+                    msg += """%s:  %s 
+%s   != 
+%s   %s
+""" % (expected_key_str,
+       repr(d_expected[expected_key]),
+       filler_str, filler_str,
+       repr(d_received[expected_key]))
     else:
         msg += ( "Not same type: "
                  + repr(d_expected)+ repr(type(d_expected)) + " != "