Skip to content

Commit

Permalink
ensure we get the warning we expect
Browse files Browse the repository at this point in the history
  • Loading branch information
mattf committed Jul 31, 2024
1 parent 96e7db5 commit 6442eb3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libs/ai-endpoints/tests/unit_tests/test_register_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ def test_registered_model_without_client_usable(public_class: type) -> None:
id = f"test/no-client-{public_class.__name__}"
model = Model(id=id, endpoint="BOGUS")
register_model(model)
# todo: this should warn that the model is known but type is not
# and therefore inference may not work
# Marking this as failed
with pytest.warns(UserWarning):
with pytest.warns(UserWarning) as record:
public_class(model=id, nvidia_api_key="a-bogus-key")
assert len(record) == 1
assert isinstance(record[0].message, UserWarning)
assert "Unable to determine validity" in str(record[0].message)


def test_missing_endpoint() -> None:
Expand Down

0 comments on commit 6442eb3

Please sign in to comment.