Skip to content

Commit 97f5364

Browse files
committed
Skip LangChain test for Python 3.8.
1 parent 777400e commit 97f5364

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

tests/unitary/with_extras/langchain/chat_models/test_oci_data_science.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
"""Test OCI Data Science Model Deployment Endpoint."""
22

3+
import sys
34
from unittest import mock
45
import pytest
56
from langchain_core.messages import AIMessage, AIMessageChunk
67
from requests.exceptions import HTTPError
78
from ads.llm import ChatOCIModelDeploymentVLLM, ChatOCIModelDeploymentTGI
89

910

11+
pytestmark = pytest.mark.skipif(
12+
sys.version_info < (3, 9), reason="Requires Python 3.9 or higher"
13+
)
14+
15+
1016
CONST_MODEL_NAME = "odsc-vllm"
1117
CONST_ENDPOINT = "https://oci.endpoint/ocid/predict"
1218
CONST_PROMPT = "This is a prompt."

tests/unitary/with_extras/langchain/llms/test_oci_model_deployment_endpoint.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
"""Test OCI Data Science Model Deployment Endpoint."""
22

3+
import sys
34
from unittest import mock
45
import pytest
56
from requests.exceptions import HTTPError
67
from ads.llm import OCIModelDeploymentTGI, OCIModelDeploymentVLLM
78

9+
pytestmark = pytest.mark.skipif(
10+
sys.version_info < (3, 9), reason="Requires Python 3.9 or higher"
11+
)
12+
813

914
CONST_MODEL_NAME = "odsc-vllm"
1015
CONST_ENDPOINT = "https://oci.endpoint/ocid/predict"

tests/unitary/with_extras/langchain/test_guardrails.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import json
88
import os
99
import tempfile
10+
import sys
1011
from typing import Any, List, Dict, Mapping, Optional
1112
from unittest import TestCase
1213
from langchain.callbacks.manager import CallbackManagerForLLMRun
@@ -19,6 +20,8 @@
1920
from ads.llm.serialize import load, dump
2021
import pytest
2122

23+
pytestmark = pytest.mark.skipif(sys.version_info < (3, 9), reason="Requires Python 3.9 or higher")
24+
2225

2326
class FakeLLM(LLM):
2427
"""Fake LLM for testing purpose."""

0 commit comments

Comments
 (0)