From 7bff5866b1dd7992d9bdcdce1bac41fe043760c1 Mon Sep 17 00:00:00 2001 From: Alan Date: Wed, 18 Jul 2018 17:29:55 -0400 Subject: [PATCH] bugfix in ApproxNumpy initialisation, use keywords for arguments now --- src/_pytest/python_api.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/_pytest/python_api.py b/src/_pytest/python_api.py index d88d1c88b..f35351e2a 100644 --- a/src/_pytest/python_api.py +++ b/src/_pytest/python_api.py @@ -211,7 +211,10 @@ class ApproxScalar(ApproxBase): the pre-specified tolerance. """ if _is_numpy_array(actual): - return ApproxNumpy(actual, self.abs, self.rel, self.nan_ok) == self.expected + return ( + ApproxNumpy(actual, rel=self.rel, abs=self.abs, nan_ok=self.nan_ok) + == self.expected + ) # Short-circuit exact equality. if actual == self.expected: