Skip to content

Commit 8acd3bf

Browse files
committed
just use log scale for stats
1 parent c7bc43d commit 8acd3bf

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

tests/test_cache.py

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,14 @@ def test_cache_deeply_nested_a2(self, nested_a_t1, nested_a_t2, nested_a_result)
3939

4040
stats = diff.get_stats()
4141
# Somehow just in python 3.5 the cache stats are different. Weird.
42-
if py_current_version == Decimal('3.5'):
43-
expected_stats = {
44-
'PASSES COUNT': 3981,
45-
'DIFF COUNT': 19586,
46-
'DISTANCE CACHE HIT COUNT': 11925,
47-
'MAX PASS LIMIT REACHED': False,
48-
'MAX DIFF LIMIT REACHED': False
49-
}
50-
else:
51-
expected_stats = {
52-
'PASSES COUNT': 3960,
53-
'DIFF COUNT': 19469,
54-
'DISTANCE CACHE HIT COUNT': 11847,
55-
'MAX PASS LIMIT REACHED': False,
56-
'MAX DIFF LIMIT REACHED': False
57-
}
58-
assert expected_stats == stats
42+
expected_stats = {
43+
'PASSES COUNT': 3960,
44+
'DIFF COUNT': 19469,
45+
'DISTANCE CACHE HIT COUNT': 11847,
46+
'MAX PASS LIMIT REACHED': False,
47+
'MAX DIFF LIMIT REACHED': False
48+
}
49+
assert not DeepDiff(expected_stats, stats, use_log_scale=True)
5950
assert nested_a_result == diff
6051
diff_of_diff = DeepDiff(nested_a_result, diff.to_dict(), ignore_order=False)
6152
assert not diff_of_diff

0 commit comments

Comments
 (0)