diff --git a/tests/test_runtime/test_error_handling_strategies.py b/tests/test_runtime/test_error_handling_strategies.py index 5e819448..3d36d314 100644 --- a/tests/test_runtime/test_error_handling_strategies.py +++ b/tests/test_runtime/test_error_handling_strategies.py @@ -1,5 +1,6 @@ from __future__ import annotations +from neps.exceptions import WorkerRaiseError import pytest from dataclasses import dataclass from pandas.core.common import contextlib @@ -59,7 +60,7 @@ def eval_function(*args, **kwargs) -> float: settings=settings, _pre_sample_hooks=None, ) - with pytest.raises(ValueError, match="This is an error"): + with pytest.raises(WorkerRaiseError): worker.run() trials = neps_state.get_all_trials()