Update src/_pytest/python_api.py

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
This commit is contained in:
Kenny Y
2023-07-08 08:41:42 -04:00
committed by GitHub
parent db37e34613
commit d4265448a5

View File

@@ -265,7 +265,7 @@ class ApproxMapping(ApproxBase):
approx_side_as_map.items(), other_side.values()
):
if approx_value != other_value:
if not any((approx_value.expected is None, other_value is None)):
if approx_value.expected is not None and other_value is not None:
max_abs_diff = max(
max_abs_diff, abs(approx_value.expected - other_value)
)