Repository: PlasmaPy/PlasmaPy

Issue:
Create plasmapy.tests [PLEP7]
As part of the changes associated with the forthcoming PLEP 7 (PlasmaPy/PlasmaPy-PLEPs#26), we decided create a ``plasmapy.tests`` sub-package.

Tasks:

- [ ] Create ``plasmapy.tests``
- [ ] Move ``plasmapy.utils.pytests_helpers`` to ``plasmapy.tests.pytest_helpers``


Discussion:

Resolving patch:
diff --git a/plasmapy/utils/pytest_helpers/__init__.py b/plasmapy/utils/pytest_helpers/__init__.py
--- a/plasmapy/utils/pytest_helpers/__init__.py
+++ b/plasmapy/utils/pytest_helpers/__init__.py
@@ -3,14 +3,3 @@
     run_test,
     run_test_equivalent_calls,
 )
-
-from .exceptions import (
-    InconsistentTypeError,
-    IncorrectResultError,
-    InvalidTestError,
-    MissingExceptionError,
-    MissingWarningError,
-    RunTestError,
-    UnexpectedExceptionError,
-    UnexpectedResultError,
-)
diff --git a/plasmapy/utils/pytest_helpers/exceptions.py b/plasmapy/utils/pytest_helpers/exceptions.py
deleted file mode 100644
--- a/plasmapy/utils/pytest_helpers/exceptions.py
+++ /dev/null
@@ -1,67 +0,0 @@
-__all__ = [
-    "RunTestError",
-    "UnexpectedResultError",
-    "InconsistentTypeError",
-    "MissingExceptionError",
-    "UnexpectedExceptionError",
-    "UnexpectedResultError",
-    "MissingExceptionError",
-    "MissingWarningError",
-    "IncorrectResultError",
-    "InvalidTestError",
-]
-
-
-class RunTestError(Exception):
-    """Base exception for test failures. Derived from `Exception`."""
-
-
-class UnexpectedResultError(RunTestError):
-    """
-    Exception for when the actual result differs from the expected
-    result.  Derived from `~plasmapy.pytest_helpers.utils.RunTestError`.
-    """
-
-
-class InconsistentTypeError(RunTestError):
-    """
-    Exception for when the type of the actual result differs from the
-    type of the expected result.  Derived from
-    `~plasmapy.utils.pytest_helpers.RunTestError`.
-    """
-
-
-class MissingExceptionError(RunTestError):
-    """
-    Exception for when an expected exception is not raised.  Derived
-    from `~plasmapy.utils.pytest_helpers.RunTestError`.
-    """
-
-
-class UnexpectedExceptionError(RunTestError):
-    """
-    Exception for when an exception is expected, but a different
-    exception is raised instead.  Derived from
-    `~plasmapy.utils.pytest_helpers.RunTestError`.
-    """
-
-
-class MissingWarningError(RunTestError):
-    """
-    Exception for when a warning is expected to be issued, but isn't.
-    Derived from `~plasmapy.utils.pytest_helpers.RunTestError`.
-    """
-
-
-class IncorrectResultError(RunTestError):
-    """
-    Exception for when the actual result differs from the expected
-    result by more than the allowed tolerance.  Derived from
-    `~plasmapy.utils.pytest_helpers.RunTestError`.
-    """
-
-
-class InvalidTestError(Exception):
-    """
-    Exception for when the inputs to a test are not valid.
-    """
diff --git a/plasmapy/utils/pytest_helpers/pytest_helpers.py b/plasmapy/utils/pytest_helpers/pytest_helpers.py
--- a/plasmapy/utils/pytest_helpers/pytest_helpers.py
+++ b/plasmapy/utils/pytest_helpers/pytest_helpers.py
@@ -18,16 +18,16 @@
 
 from typing import Any, Callable, Dict
 
-from plasmapy.utils.error_messages import _exc_str, _represent_result, call_string
-from plasmapy.utils.exceptions import PlasmaPyWarning
-from plasmapy.utils.pytest_helpers.exceptions import (
-    InconsistentTypeError,
+from plasmapy.tests.helpers.exceptions import (
     InvalidTestError,
-    MissingExceptionError,
-    MissingWarningError,
-    UnexpectedExceptionError,
-    UnexpectedResultError,
+    MissingExceptionFail,
+    MissingWarningFail,
+    TypeMismatchFail,
+    UnexpectedExceptionFail,
+    UnexpectedResultFail,
 )
+from plasmapy.utils.error_messages import _exc_str, _represent_result, call_string
+from plasmapy.utils.exceptions import PlasmaPyWarning
 
 # These colors/styles are used to highlight certain parts of the error
 # messages in consistent ways.
@@ -130,22 +130,22 @@ def run_test(
 
     Raises
     ------
-    ~plasmapy.utils.pytest_helpers.UnexpectedResultError
+    ~plasmapy.tests.helpers.exceptions.UnexpectedResultFail
         If the test returns a result that is different from the expected
         result.
 
-    ~plasmapy.utils.pytest_helpers.InconsistentTypeError
+    ~plasmapy.tests.helpers.exceptions.TypeMismatchFail
         If the actual result is of a different type than the expected
         result.
 
-    ~plasmapy.utils.pytest_helpers.UnexpectedExceptionError
+    ~plasmapy.tests.helpers.exceptions.UnexpectedExceptionFail
         If an exception occurs when no exception or a different
         exception is expected.
 
-    ~plasmapy.utils.pytest_helpers.MissingExceptionError
+    ~plasmapy.tests.helpers.exceptions.MissingExceptionFail
         If no exception is raised when an exception is expected.
 
-    ~plasmapy.utils.pytest_helpers.MissingWarningError
+    ~plasmapy.tests.helpers.exceptions.MissingWarningFail
         An expected warning is not issued.
 
     ~astropy.units.UnitsError
@@ -295,7 +295,7 @@ def test_func(inputs):
             if resulting_exception.__name__ == expected_exception.__name__:
                 return None
             else:
-                raise UnexpectedExceptionError(
+                raise UnexpectedExceptionFail(
                     f"The command {call_str} did not specifically raise "
                     f"{_exc_str(expected_exception)} as expected, but "
                     f"instead raised {_exc_str(resulting_exception)} "
@@ -303,13 +303,13 @@ def test_func(inputs):
                 )
         except Exception as exc_unexpected_exception:
             unexpected_exception = exc_unexpected_exception.__reduce__()[0]
-            raise UnexpectedExceptionError(
+            raise UnexpectedExceptionFail(
                 f"The command {call_str} did not raise "
                 f"{_exc_str(expected_exception)} as expected, "
                 f"but instead raised {_exc_str(unexpected_exception)}."
             ) from exc_unexpected_exception
         else:
-            raise MissingExceptionError(
+            raise MissingExceptionFail(
                 f"The command {call_str} did not raise "
                 f"{_exc_str(expected_exception)} as expected, but instead "
                 f"returned {_represent_result(result)}."
@@ -319,13 +319,13 @@ def test_func(inputs):
         with pytest.warns(expected["warning"]):
             result = func(*args, **kwargs)
     except pytest.raises.Exception as missing_warning:
-        raise MissingWarningError(
+        raise MissingWarningFail(
             f"The command {call_str} should issue "
             f"{_exc_str(expected['warning'])}, but instead returned "
             f"{_represent_result(result)}."
         ) from missing_warning
     except Exception as exception_no_warning:
-        raise UnexpectedExceptionError(
+        raise UnexpectedExceptionFail(
             f"The command {call_str} unexpectedly raised "
             f"{_exc_str(exception_no_warning.__reduce__()[0])} "
             f"instead of returning the expected value of "
@@ -377,7 +377,7 @@ def test_func(inputs):
         return None
 
     if type(result) != type(expected["result"]):
-        raise InconsistentTypeError(
+        raise TypeMismatchFail(
             f"The command {call_str} returned "
             f"{_represent_result(result)} which has type "
             f"{_represent_result(type(result), color=_type_color)}, "
@@ -424,7 +424,7 @@ def test_func(inputs):
             errmsg += f"rtol = {rtol}"
     errmsg += "."
 
-    raise UnexpectedResultError(errmsg)
+    raise UnexpectedResultFail(errmsg)
 
 
 def run_test_equivalent_calls(*test_inputs, require_same_type: bool = True):
@@ -445,16 +445,16 @@ def run_test_equivalent_calls(*test_inputs, require_same_type: bool = True):
 
     Raises
     ------
-    ~plasmapy.utils.pytest_helpers.UnexpectedResultError
+    ~plasmapy.tests.helpers.exceptions.UnexpectedResultFail
         If not all of the results are equivalent, or not all of the
         results are of the same type and `require_same_type` evaluates
         to `True`.
 
-    ~plasmapy.utils.pytest_helpers.UnexpectedExceptionError
+    ~plasmapy.tests.helpers.exceptions.UnexpectedExceptionFail
         If an exception is raised whilst attempting to run one of the
         test cases.
 
-    ~plasmapy.utils.pytest_helpers.InvalidTestError
+    ~plasmapy.tests.helpers.exceptions.InvalidTestError
         If there is an error associated with the inputs or the test is
         set up incorrectly.
 
@@ -598,7 +598,7 @@ def run_test_equivalent_calls(*test_inputs, require_same_type: bool = True):
             test_case["result"] = f(*args, **kwargs)
             test_case["type"] = type(test_case["result"])
         except Exception as exc:
-            raise UnexpectedExceptionError(
+            raise UnexpectedExceptionFail(
                 f"Unable to evaluate {test_case['call string']}."
             )
 
@@ -611,7 +611,7 @@ def run_test_equivalent_calls(*test_inputs, require_same_type: bool = True):
     try:
         equals_first_result = [result == results[0] for result in results]
     except Exception as exc:  # coverage: ignore
-        raise UnexpectedExceptionError(
+        raise UnexpectedExceptionFail(
             f"Unable to determine equality properties of results."
         ) from exc
 
@@ -633,7 +633,7 @@ def run_test_equivalent_calls(*test_inputs, require_same_type: bool = True):
                 f"of type {test_case['type']}"
             )
 
-        raise UnexpectedResultError(errmsg)
+        raise UnexpectedResultFail(errmsg)
 
 
 def assert_can_handle_nparray(
@@ -655,22 +655,22 @@ def assert_can_handle_nparray(
         `["coulomb_log"]`
         `["characteristic_length"]`
 
-    insert_some_nans: list
+    insert_some_nans: `list`
         List of argument names in which to insert some np.nan values.
         These must be arguments that will be tested as vectors as listed
         above.
 
-    insert_all_nans: list
+    insert_all_nans: `list`
         List of argument names to fill entirely with np.nan values.
 
-    kwargs: dict
+    kwargs: `dict`
         Arguments to pass directly to the function in under test, in the
         normal kwargs python dictionary format.
 
     Raises
     ------
     ValueError
-        If this function cannot interpret a parameter of function_to_test,
+        If this function cannot interpret a parameter of function_to_test.
 
     Examples
     --------


Test patch:
diff --git a/docs/api_static/plasmapy.tests.helpers.exceptions.rst b/docs/api_static/plasmapy.tests.helpers.exceptions.rst
new file mode 100644
--- /dev/null
+++ b/docs/api_static/plasmapy.tests.helpers.exceptions.rst
@@ -0,0 +1,10 @@
+:orphan:
+
+`plasmapy.tests.helpers.exceptions`
+===================================
+
+.. currentmodule:: plasmapy.tests.helpers.exceptions
+
+.. automodapi::  plasmapy.tests.helpers.exceptions
+   :include-all-objects:
+   :no-heading:
diff --git a/docs/api_static/plasmapy.tests.helpers.rst b/docs/api_static/plasmapy.tests.helpers.rst
new file mode 100644
--- /dev/null
+++ b/docs/api_static/plasmapy.tests.helpers.rst
@@ -0,0 +1,21 @@
+:orphan:
+
+`plasmapy.tests.helpers`
+========================
+
+.. currentmodule:: plasmapy.tests.helpers
+
+.. automodule:: plasmapy.tests.helpers
+
+Sub-Packages & Modules
+----------------------
+
+.. autosummary::
+
+   exceptions
+
+.. automodapi::  plasmapy.tests.helpers
+   :include-all-objects:
+   :no-main-docstr:
+   :no-heading:
+   :headings: "-^
diff --git a/plasmapy/tests/__init__.py b/plasmapy/tests/__init__.py
new file mode 100644
--- /dev/null
+++ b/plasmapy/tests/__init__.py
@@ -0,0 +1,3 @@
+"""PlasmaPy tests and test helpers."""
+
+from . import helpers
diff --git a/plasmapy/tests/helpers/__init__.py b/plasmapy/tests/helpers/__init__.py
new file mode 100644
--- /dev/null
+++ b/plasmapy/tests/helpers/__init__.py
@@ -0,0 +1,49 @@
+"""Test helper functionality for PlasmaPy and affiliated packages."""
+
+__all__ = [
+    "ExceptionMismatchFail",
+    "InvalidTestError",
+    "MissingExceptionFail",
+    "MissingWarningFail",
+    "TestFailed",
+    "TypeMismatchFail",
+    "UnexpectedExceptionFail",
+    "UnexpectedResultFail",
+    "UnexpectedWarningFail",
+    "WarningMismatchFail",
+]
+
+
+# This file contains several commented out import statements.  These
+# statements will be uncommented out over the course of several pull
+# requests that were each originally part of #728.  The blank lines
+# between the import statements will hopefully simplify automatic merging.
+
+# from plasmapy.tests.helpers.actual import ActualTestOutcome
+
+# from plasmapy.tests.helpers.cases import AttrTestCase, FunctionTestCase, MethodTestCase
+
+from plasmapy.tests.helpers.exceptions import (
+    ExceptionMismatchFail,
+    InvalidTestError,
+    MissingExceptionFail,
+    MissingWarningFail,
+    TestFailed,
+    TypeMismatchFail,
+    UnexpectedExceptionFail,
+    UnexpectedResultFail,
+    UnexpectedWarningFail,
+    WarningMismatchFail,
+)
+
+# from plasmapy.tests.helpers.expected import ExpectedTestOutcome
+
+#  from plasmapy.tests.helpers.inputs import (
+#      AbstractTestInputs,
+#      ClassAttributeTestInputs,
+#     ClassMethodTestInputs,
+#     FunctionTestInputs,
+#     GenericClassTestInputs,
+# )
+
+# from plasmapy.tests.helpers.runner import test_runner
diff --git a/plasmapy/tests/helpers/exceptions.py b/plasmapy/tests/helpers/exceptions.py
new file mode 100644
--- /dev/null
+++ b/plasmapy/tests/helpers/exceptions.py
@@ -0,0 +1,105 @@
+"""Exceptions that describe different types of test failures."""
+
+__all__ = [
+    "ExceptionMismatchFail",
+    "InvalidTestError",
+    "MissingExceptionFail",
+    "MissingWarningFail",
+    "TestFailed",
+    "TypeMismatchFail",
+    "UnexpectedExceptionFail",
+    "UnexpectedResultFail",
+    "UnexpectedWarningFail",
+    "WarningMismatchFail",
+]
+
+from _pytest.outcomes import Failed
+
+
+class TestFailed(Failed):
+    """
+    Base exception for test failures.
+
+    Notes
+    -----
+    This exception was derived from `~pytest.fail.Exception`, which in
+    turn was derived from `BaseException` (not `Exception`).
+    """
+
+    pass
+
+
+class TypeMismatchFail(TestFailed):
+    """
+    Exception for when the type of the actual result differs from the
+    type of the expected result.
+    """
+
+    pass
+
+
+class MissingExceptionFail(TestFailed):
+    """
+    Exception for when the expected exception is not raised.
+    """
+
+    pass
+
+
+class UnexpectedExceptionFail(TestFailed):
+    """
+    Exception for when an exception is raised unexpectedly.
+    """
+
+    pass
+
+
+class ExceptionMismatchFail(UnexpectedExceptionFail, MissingExceptionFail):
+    """
+    Exception for when an exception is expected, but a different
+    exception is raised.
+    """
+
+    pass
+
+
+class UnexpectedWarningFail(TestFailed):
+    """
+    Exception for when a warning is issued unexpectedly.
+    """
+
+    pass
+
+
+class MissingWarningFail(TestFailed):
+    """
+    Exception for when an expected warning is not issued.
+    """
+
+    pass
+
+
+class WarningMismatchFail(UnexpectedWarningFail, MissingWarningFail):
+    """
+    Exception for when a warning is expected, but one or more
+    different warnings were issued instead.
+    """
+
+    pass
+
+
+class UnexpectedResultFail(TestFailed):
+    """
+    Exception for when the returned value does not match the value that
+    was expected.
+    """
+
+    pass
+
+
+class InvalidTestError(Exception):
+    """
+    Exception for when the inputs to a test are not valid.
+    """
+
+    pass
diff --git a/plasmapy/tests/helpers/tests/__init__.py b/plasmapy/tests/helpers/tests/__init__.py
new file mode 100644
diff --git a/plasmapy/utils/pytest_helpers/tests/test_pytest_helpers.py b/plasmapy/utils/pytest_helpers/tests/test_pytest_helpers.py
--- a/plasmapy/utils/pytest_helpers/tests/test_pytest_helpers.py
+++ b/plasmapy/utils/pytest_helpers/tests/test_pytest_helpers.py
@@ -5,17 +5,16 @@
 from typing import Any
 
 from plasmapy.particles import Particle
+from plasmapy.tests.helpers import (
+    MissingExceptionFail,
+    MissingWarningFail,
+    TypeMismatchFail,
+    UnexpectedExceptionFail,
+    UnexpectedResultFail,
+)
 from plasmapy.utils import call_string
 from plasmapy.utils.exceptions import PlasmaPyError, PlasmaPyWarning
-from plasmapy.utils.pytest_helpers import (
-    InconsistentTypeError,
-    MissingExceptionError,
-    MissingWarningError,
-    run_test,
-    run_test_equivalent_calls,
-    UnexpectedExceptionError,
-    UnexpectedResultError,
-)
+from plasmapy.utils.pytest_helpers import run_test, run_test_equivalent_calls
 
 
 def generic_function(*args, **kwargs):
@@ -80,25 +79,25 @@ def test_call_string(function, args, kwargs, expected):
     [adams_number, 0, {"y": 1}, 42, None],
     [adams_number, (1,), {"y": 1}, 42, None],
     [adams_number, (2, 1), {}, 42, None],
-    [adams_number, 3, {"y": 1}, 6 * 9, UnexpectedResultError],
-    [adams_number, (4,), {"y": 1}, 6 * 9, UnexpectedResultError],
-    [adams_number, (5, 1), {}, 6 * 9, UnexpectedResultError],
+    [adams_number, 3, {"y": 1}, 6 * 9, UnexpectedResultFail],
+    [adams_number, (4,), {"y": 1}, 6 * 9, UnexpectedResultFail],
+    [adams_number, (5, 1), {}, 6 * 9, UnexpectedResultFail],
     [raise_exception, 6, {"y": 1}, PlasmaPyError, None],
     [raise_exception, (7,), {"y": 1}, PlasmaPyError, None],
     [raise_exception, (8, 1), {}, PlasmaPyError, None],
-    [raise_exception, 9, {"y": 1}, TypeError, UnexpectedExceptionError],
-    [raise_exception, (10,), {"y": 1}, TypeError, UnexpectedExceptionError],
-    [raise_exception, (11, 1), {}, Exception, UnexpectedExceptionError],
+    [raise_exception, 9, {"y": 1}, TypeError, UnexpectedExceptionFail],
+    [raise_exception, (10,), {"y": 1}, TypeError, UnexpectedExceptionFail],
+    [raise_exception, (11, 1), {}, Exception, UnexpectedExceptionFail],
     [issue_warning, 12, {"y": 1}, PlasmaPyWarning, None],
     [issue_warning, (13,), {"y": 1}, PlasmaPyWarning, None],
     [issue_warning, (14, 1), {}, PlasmaPyWarning, None],
-    [issue_warning, 15, {"y": 1}, (42, UserWarning), MissingWarningError],
-    [issue_warning, (16,), {"y": 1}, (42, UserWarning), MissingWarningError],
-    [issue_warning, (17, 1), {}, (42, UserWarning), MissingWarningError],
+    [issue_warning, 15, {"y": 1}, (42, UserWarning), MissingWarningFail],
+    [issue_warning, (16,), {"y": 1}, (42, UserWarning), MissingWarningFail],
+    [issue_warning, (17, 1), {}, (42, UserWarning), MissingWarningFail],
     [return_quantity, (18), {}, 5 * u.m / u.s, None],
     [return_quantity, (19), {}, u.m / u.s, None],
     [return_quantity, (20), {}, u.barn * u.Mpc, u.UnitsError],
-    [return_quantity, (21), {}, 4 * u.m / u.s, UnexpectedResultError],
+    [return_quantity, (21), {}, 4 * u.m / u.s, UnexpectedResultFail],
     [return_quantity, (22), {}, 5 * u.kg / u.s, u.UnitsError],
     [return_quantity, (23), {"should_warn": True}, (5 * u.m / u.s, UserWarning), None],
     [
@@ -106,7 +105,7 @@ def test_call_string(function, args, kwargs, expected):
         (24),
         {"should_warn": False},
         (5 * u.m / u.s, UserWarning),
-        MissingWarningError,
+        MissingWarningFail,
     ],
     [return_arg, u.kg / u.K, {}, u.kg / u.K, None],
     [return_arg, u.kg / u.K, {}, u.kg / u.N, u.UnitsError],
@@ -114,9 +113,9 @@ def test_call_string(function, args, kwargs, expected):
     [return_arg, u.C, {"should_warn": True}, (u.C, UserWarning), None],
     [adams_number, 1, {"x": 1}, u.pc, u.UnitsError],
     [return_arg, Particle("p+"), {}, Particle("proton"), None],
-    [return_arg, Particle("e+"), {}, Particle("e-"), UnexpectedResultError],
-    [return_arg, Particle("mu+"), {}, type, InconsistentTypeError],
-    [return_arg, (2,), {}, IOError, MissingExceptionError],
+    [return_arg, Particle("e+"), {}, Particle("e-"), UnexpectedResultFail],
+    [return_arg, Particle("mu+"), {}, type, TypeMismatchFail],
+    [return_arg, (2,), {}, IOError, MissingExceptionFail],
 ]
 
 
@@ -186,7 +185,7 @@ def test_run_test_rtol():
 
 
 def test_run_test_rtol_failure():
-    with pytest.raises(UnexpectedResultError):
+    with pytest.raises(UnexpectedResultFail):
         run_test(return_arg, 1.0, {}, 0.999999, rtol=1e-7)
         pytest.fail("No exception raised for rtol test.")
 
@@ -196,7 +195,7 @@ def test_run_test_atol():
 
 
 def test_run_test_atol_failure():
-    with pytest.raises(UnexpectedResultError):
+    with pytest.raises(UnexpectedResultFail):
         run_test(return_arg, (1.0,), {}, 0.999999, atol=1e-7)
         pytest.fail("No exception raised for atol test.")
 
@@ -229,7 +228,7 @@ def test_func(inputs):
 run_test_equivalent_calls_table = [
     # cases like inputs = (func, (args, kwargs), (args, kwargs), (args, kwargs))
     [(return_arg, [(1,), {}], [(1,), {}]), None],
-    [(return_arg, [(1,), {}], [(86,), {}]), UnexpectedResultError],
+    [(return_arg, [(1,), {}], [(86,), {}]), UnexpectedResultFail],
     [(return_arg, [(1,), {}], [(1,), {}], [(1,), {}], [(1,), {}], [(1,), {}]), None],
     # cases like inputs = [(func, args, kwargs), (func, args, kwargs))
     (((return_arg, (1,), {}), (return_arg, (1,), {})), None),
@@ -249,20 +248,20 @@ def test_func(inputs):
             (return_arg, (3,), {}),
             (return_arg, (4,)),
         ),
-        UnexpectedResultError,
+        UnexpectedResultFail,
     ),
     # cases where there are no kwargs
     ((return_arg, [1], [1]), None),
-    ((return_arg, ["this"], ["that"]), UnexpectedResultError),
+    ((return_arg, ["this"], ["that"]), UnexpectedResultFail),
     ([(return_arg, [1], [1])], None),
     # cases where there are no kwargs and the args are not in tuples or lists
     ((return_arg, 1, 1, 1, 1), None),
-    ((return_arg, 1, 1, 1, 8794), UnexpectedResultError),
+    ((return_arg, 1, 1, 1, 8794), UnexpectedResultFail),
     (((lambda x, y: x + y, (1, 0), {}), (lambda x, y: x * y, (1, 1), {})), None),
     (((lambda x, y: x + y, (1, 0), {}), (lambda x, y: x * y, (1, 1), {})), None),
     (
         ((lambda x, y: x + y, (1, 0), {}), (lambda x, y: x * y, (1, 59), {})),
-        UnexpectedResultError,
+        UnexpectedResultFail,
     ),
 ]
 
@@ -284,5 +283,5 @@ def test_run_test_equivalent_calls(inputs, error):
 
 def test_run_test_equivalent_calls_types():
     run_test_equivalent_calls(return_arg, 1, 1.0, require_same_type=False)
-    with pytest.raises(UnexpectedResultError):
+    with pytest.raises(UnexpectedResultFail):
         run_test_equivalent_calls(return_arg, 1, 1.0)