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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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)
)