diff --git a/_pytest/python_api.py b/_pytest/python_api.py index fe2222059..176aff590 100644 --- a/_pytest/python_api.py +++ b/_pytest/python_api.py @@ -66,7 +66,7 @@ class ApproxNumpy(ApproxBase): try: actual = np.asarray(actual) except: - raise ValueError("cannot compare '{0}' to numpy.ndarray".format(actual)) + raise TypeError("cannot compare '{0}' to numpy.ndarray".format(actual)) if actual.shape != self.expected.shape: return False