Skip to content

Commit

Permalink
test for invalid model
Browse files Browse the repository at this point in the history
  • Loading branch information
isaaccorley committed Apr 22, 2023
1 parent e8b001f commit d71a252
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/trainers/test_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,12 @@ def test_trainer(
except MisconfigurationException:
pass

def test_invalid_model(self, model_kwargs: dict[str, Any]) -> None:
model_kwargs["model"] = "invalid_model"
match = "Model type 'invalid_model' is not valid."
with pytest.raises(ValueError, match=match):
PixelwiseRegressionTask(**model_kwargs)

@pytest.fixture
def model_kwargs(self) -> dict[str, Any]:
return {
Expand Down

0 comments on commit d71a252

Please sign in to comment.