Skip to content

Commit

Permalink
remove inactive tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ccurme committed Sep 6, 2024
1 parent e0be054 commit 7bf4938
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 50 deletions.
26 changes: 1 addition & 25 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 Generator, List, Optional, Type
from typing import Generator, List, Optional

import pytest
from langchain_core.language_models import BaseChatModel
from langchain_core.messages import (
AIMessage,
AIMessageChunk,
Expand All @@ -17,7 +16,6 @@
)
from langchain_core.pydantic_v1 import BaseModel
from langchain_core.tools import tool
from langchain_standard_tests.integration_tests import ChatModelIntegrationTests

from langchain_google_genai import (
ChatGoogleGenerativeAI,
Expand All @@ -31,28 +29,6 @@
_B64_string = """iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAABhGlDQ1BJQ0MgUHJvZmlsZQAAeJx9kT1Iw0AcxV8/xCIVQTuIKGSoTi2IijhqFYpQIdQKrTqYXPoFTRqSFBdHwbXg4Mdi1cHFWVcHV0EQ/ABxdXFSdJES/5cUWsR4cNyPd/ced+8Af6PCVDM4DqiaZaSTCSGbWxW6XxHECPoRQ0hipj4niil4jq97+Ph6F+dZ3uf+HL1K3mSATyCeZbphEW8QT29aOud94ggrSQrxOXHMoAsSP3JddvmNc9FhP8+MGJn0PHGEWCh2sNzBrGSoxFPEUUXVKN+fdVnhvMVZrdRY6578heG8trLMdZrDSGIRSxAhQEYNZVRgIU6rRoqJNO0nPPxDjl8kl0yuMhg5FlCFCsnxg//B727NwuSEmxROAF0vtv0xCnTvAs26bX8f23bzBAg8A1da219tADOfpNfbWvQI6NsGLq7bmrwHXO4Ag0+6ZEiOFKDpLxSA9zP6phwwcAv0rLm9tfZx+gBkqKvUDXBwCIwVKXvd492hzt7+PdPq7wdzbXKn5swsVgAAA8lJREFUeJx90dtPHHUUB/Dz+81vZhb2wrDI3soUKB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WlpPZU0wJRG85ns84umU3k+VyxeEcWqvYUBAGsUrbvme4be99HFeisP/pwUOIZaOqQX31ISgrKmZhLHtXNXuJq68orrr5/9mBCglCLAGGPyy81votEbcjlKLrC9E8mhH3wdHRdcyyvjidSlxjftPJpD+o25JYvRHGFoZDdks1mBQhxJu9uxvwEiXuHnHbLd1AAAAABJRU5ErkJggg==""" # noqa: E501


class GoogleGenerativeAIStandardTests(ChatModelIntegrationTests):
@property
def chat_model_class(self) -> Type[BaseChatModel]:
return ChatGoogleGenerativeAI

@property
def chat_model_params(self) -> dict:
return {"model": _MODEL}

@property
def supports_image_inputs(self) -> bool:
return True

@property
def supports_video_inputs(self) -> bool:
return True

@property
def supports_audio_inputs(self) -> bool:
return True


def _check_usage_metadata(message: AIMessage) -> None:
assert message.usage_metadata is not None
assert message.usage_metadata["input_tokens"] > 0
Expand Down
26 changes: 1 addition & 25 deletions libs/genai/tests/unit_tests/test_chat_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import asyncio
import json
from concurrent.futures import ThreadPoolExecutor
from typing import Dict, List, Optional, Type, Union
from typing import Dict, List, Optional, Union
from unittest.mock import ANY, Mock, patch

import google.ai.generativelanguage as glm
Expand All @@ -14,7 +14,6 @@
GenerateContentResponse,
Part,
)
from langchain_core.language_models import BaseChatModel
from langchain_core.load import dumps, loads
from langchain_core.messages import (
AIMessage,
Expand All @@ -25,7 +24,6 @@
)
from langchain_core.messages.tool import tool_call as create_tool_call
from langchain_core.pydantic_v1 import SecretStr
from langchain_standard_tests.unit_tests import ChatModelUnitTests
from pytest import CaptureFixture

from langchain_google_genai.chat_models import (
Expand All @@ -35,28 +33,6 @@
)


class GoogleGenerativeAIStandardTests(ChatModelUnitTests):
@property
def chat_model_class(self) -> Type[BaseChatModel]:
return ChatGoogleGenerativeAI

@property
def chat_model_params(self) -> dict:
return {"model": "gemini-1.5-pro"}

@property
def supports_image_inputs(self) -> bool:
return True

@property
def supports_video_inputs(self) -> bool:
return True

@property
def supports_audio_inputs(self) -> bool:
return True


def test_integration_initialization() -> None:
"""Test chat model initialization."""
llm = ChatGoogleGenerativeAI(
Expand Down

0 comments on commit 7bf4938

Please sign in to comment.