diff options
author | Michael Fladischer <FladischerMichael@fladi.at> | 2017-03-16 11:54:06 +0100 |
---|---|---|
committer | Michael Fladischer <FladischerMichael@fladi.at> | 2017-03-16 11:54:06 +0100 |
commit | d53380c5c4fb5eee56cf76a2a3df379c8a842556 (patch) | |
tree | 37d76deb84db8249dcc848ecf0fa30222c61f367 /testfixtures/comparison.py | |
parent | b3abbb47901caf30202a2f0c6607aa9cf7e98c94 (diff) |
Import python-testfixtures_4.13.5.orig.tar.gz
Diffstat (limited to 'testfixtures/comparison.py')
-rw-r--r-- | testfixtures/comparison.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/testfixtures/comparison.py b/testfixtures/comparison.py index 60837b4..a30d474 100644 --- a/testfixtures/comparison.py +++ b/testfixtures/comparison.py @@ -137,11 +137,12 @@ def _compare_mapping(x, y, context, obj_for_class): )) else: same.append(key) + + if not (x_not_y or y_not_x or diffs): + return + lines = ['%s not as expected:' % obj_for_class.__class__.__name__] if same: - set_same = set(same) - if set_same == x_keys == y_keys: - return lines.extend(('', 'same:', repr(same))) x_label = context.x_label or 'first' |