mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
fix test exceptions
This commit is contained in:
parent
990651c8c0
commit
e05dc989c4
1 changed files with 0 additions and 13 deletions
|
@ -46,19 +46,6 @@ def test_context_window(model):
|
||||||
with pytest.raises(ContextWindowExceededError):
|
with pytest.raises(ContextWindowExceededError):
|
||||||
completion(model=model, messages=messages)
|
completion(model=model, messages=messages)
|
||||||
|
|
||||||
def test_uninstall_cohere_and_completion_call():
|
|
||||||
# Uninstall cohere package
|
|
||||||
subprocess.call(["pip", "uninstall", "cohere"])
|
|
||||||
|
|
||||||
model = "command-nightly"
|
|
||||||
sample_text = "how does a court case get to the Supreme Court?" * 1000
|
|
||||||
messages = [{"content": sample_text, "role": "user"}]
|
|
||||||
|
|
||||||
# with pytest.raises(Exception):
|
|
||||||
completion(model=model, messages=messages)
|
|
||||||
|
|
||||||
test_uninstall_cohere_and_completion_call()
|
|
||||||
|
|
||||||
# Test 2: InvalidAuth Errors
|
# Test 2: InvalidAuth Errors
|
||||||
@pytest.mark.parametrize("model", models)
|
@pytest.mark.parametrize("model", models)
|
||||||
def invalid_auth(model): # set the model key to an invalid key, depending on the model
|
def invalid_auth(model): # set the model key to an invalid key, depending on the model
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue