From d4265448a58434f624c8d1817a7173a168b0f300 Mon Sep 17 00:00:00 2001 From: Kenny Y <24802984+kenny-y-dev@users.noreply.github.com> Date: Sat, 8 Jul 2023 08:41:42 -0400 Subject: [PATCH] Update src/_pytest/python_api.py Co-authored-by: Bruno Oliveira --- src/_pytest/python_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_pytest/python_api.py b/src/_pytest/python_api.py index 35560f168..200b2b3aa 100644 --- a/src/_pytest/python_api.py +++ b/src/_pytest/python_api.py @@ -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) )