This commit is contained in:
Yechiel Vizel 2024-07-03 08:54:04 +08:00 committed by GitHub
commit d1fbd2445d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 3 deletions

View File

@ -296,6 +296,7 @@ Milan Lesnek
Miro Hrončok
mrbean-bremen
Nathan Goldbaum
Nathan Sala
Nathaniel Compton
Nathaniel Waisbrot
Ned Batchelder
@ -449,6 +450,7 @@ Xuan Luong
Xuecong Liao
Yannick Péroux
Yao Xiao
Yechiel Vizel
Yoav Caspi
Yuliang Shao
Yusuke Kadowaki

View File

@ -0,0 +1 @@
Fix approx wrong error description, when using to compare 2 dicts which are not in the same order - printing all values as wrong.

View File

@ -257,9 +257,8 @@ class ApproxMapping(ApproxBase):
max_abs_diff = -math.inf
max_rel_diff = -math.inf
different_ids = []
for (approx_key, approx_value), other_value in zip(
approx_side_as_map.items(), other_side.values()
):
for approx_key, approx_value in approx_side_as_map.items():
other_value = other_side[approx_key]
if approx_value != other_value:
if approx_value.expected is not None and other_value is not None:
max_abs_diff = max(