Skip to content

Commit 299149b

Browse files
committed
Skip LangChain tests for Python 3.8
1 parent 0668f8a commit 299149b

File tree

2 files changed

+10
-18
lines changed

2 files changed

+10
-18
lines changed

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

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@
1111
from unittest import mock
1212

1313
import pytest
14+
15+
16+
if sys.version_info < (3, 9):
17+
pytest.skip(allow_module_level=True)
18+
1419
from langchain_core.messages import AIMessage, AIMessageChunk
1520
from requests.exceptions import HTTPError
1621

1722
from ads.llm import ChatOCIModelDeploymentVLLM, ChatOCIModelDeploymentTGI
1823

1924

20-
pytestmark = pytest.mark.skipif(
21-
sys.version_info < (3, 9), reason="Requires Python 3.9 or higher"
22-
)
23-
24-
2525
CONST_MODEL_NAME = "odsc-vllm"
2626
CONST_ENDPOINT = "https://oci.endpoint/ocid/predict"
2727
CONST_PROMPT = "This is a prompt."
@@ -73,10 +73,6 @@
7373
for delta in CONST_STREAM_DELTAS
7474
)
7575

76-
pytestmark = pytest.mark.skipif(
77-
sys.version_info < (3, 9), reason="Requires Python 3.9 or higher"
78-
)
79-
8076

8177
class MockResponse:
8278
"""Represents a mocked response."""

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

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
from unittest import mock
1212

1313
import pytest
14-
from requests.exceptions import HTTPError
1514

16-
from ads.llm import OCIModelDeploymentTGI, OCIModelDeploymentVLLM
15+
if sys.version_info < (3, 9):
16+
pytest.skip(allow_module_level=True)
1717

18-
pytestmark = pytest.mark.skipif(
19-
sys.version_info < (3, 9), reason="Requires Python 3.9 or higher"
20-
)
18+
19+
from requests.exceptions import HTTPError
20+
from ads.llm import OCIModelDeploymentTGI, OCIModelDeploymentVLLM
2121

2222

2323
CONST_MODEL_NAME = "odsc-vllm"
@@ -53,10 +53,6 @@
5353
for word in CONST_COMPLETION.split(" ")
5454
)
5555

56-
pytestmark = pytest.mark.skipif(
57-
sys.version_info < (3, 9), reason="Requires Python 3.9 or higher"
58-
)
59-
6056

6157
class MockResponse:
6258
"""Represents a mocked response."""

0 commit comments

Comments
 (0)