Skip to content

Commit

Permalink
linting fixed in some of the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vishah02 committed Dec 11, 2024
1 parent 8eb227a commit 72db52b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions libs/genai/tests/integration_tests/test_chat_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

import asyncio
import json
from typing import Dict, Generator, List, Optional, TypedDict
from typing import Dict, Generator, List, Optional

import pytest
import typing_extensions
from langchain_core.messages import (
AIMessage,
AIMessageChunk,
Expand Down Expand Up @@ -555,7 +554,8 @@ def test_output_matches_prompt_keys() -> None:
pytest.fail(f"Response is not valid JSON: {e}")

list_key = prompt_key_names["list_key"]
assert list_key in response_data, f"Expected key '{list_key}' is missing in the response."
assert list_key in response_data, \
f"Expected key '{list_key}' is missing in the response."
grocery_items = response_data[list_key]
assert isinstance(grocery_items, list), f"'{list_key}' should be a list."

Expand Down Expand Up @@ -600,4 +600,6 @@ def test_validate_response_mime_type_and_schema() -> None:
response_mime_type="application/json",
).validate_environment()
except ValueError as e:
pytest.fail(f"Validation failed unexpectedly with a valid MIME type and no schema: {e}")
pytest.fail(
f"Validation failed unexpectedly with a valid MIME type and no schema: {e}"
)

0 comments on commit 72db52b

Please sign in to comment.