Browse Source

test comparison: test_eq pformat

Fabian Peter Hammerle 7 years ago
parent
commit
b3e3998841
1 changed files with 8 additions and 2 deletions
  1. 8 2
      tests/test_comparison.py

+ 8 - 2
tests/test_comparison.py

@@ -4,8 +4,9 @@ import pytest
 
 import datetime
 import dingguo
-import yaml
 import os
+import pprint
+import yaml
 
 def get_item_a():
     return dingguo.Item(
@@ -94,7 +95,12 @@ def get_person_b():
     [get_order_c(), get_order_c()],
     ])
 def test_eq(a, b):
-    assert a == b
+    assert a == b, '\n'.join([
+        'a = %r' % a,
+        'b = %r' % b,
+        'vars(a) = %s' % pprint.pformat(vars(a)),
+        'vars(b) = %s' % pprint.pformat(vars(b)),
+        ])
     assert b == a
     assert not a != b
     assert not b != a