Skip to content

Commit

Permalink
Test set_alias(..., alias) too, refs #154
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Aug 20, 2023
1 parent 8cdcf1e commit 2d73e6c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_aliases.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
import pytest


def test_set_alias():
@pytest.mark.parametrize("model_id_or_alias", ("gpt-3.5-turbo", "chatgpt"))
def test_set_alias(model_id_or_alias):
with pytest.raises(llm.UnknownModelError):
llm.get_model("this-is-a-new-alias")
llm.set_alias("this-is-a-new-alias", "gpt-3.5-turbo")
llm.set_alias("this-is-a-new-alias", model_id_or_alias)
assert llm.get_model("this-is-a-new-alias").model_id == "gpt-3.5-turbo"


Expand Down

0 comments on commit 2d73e6c

Please sign in to comment.