Skip to content

Commit

Permalink
test: Fix pytest.raises expected Error type
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiebergman committed Aug 5, 2024
1 parent e2f4ef2 commit 0062dda
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_runtime/test_error_handling_strategies.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 0062dda

Please sign in to comment.