File tree Expand file tree Collapse file tree 2 files changed +10
-18
lines changed
Expand file tree Collapse file tree 2 files changed +10
-18
lines changed Original file line number Diff line number Diff line change 1111from unittest import mock
1212
1313import pytest
14+
15+
16+ if sys .version_info < (3 , 9 ):
17+ pytest .skip (allow_module_level = True )
18+
1419from langchain_core .messages import AIMessage , AIMessageChunk
1520from requests .exceptions import HTTPError
1621
1722from 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-
2525CONST_MODEL_NAME = "odsc-vllm"
2626CONST_ENDPOINT = "https://oci.endpoint/ocid/predict"
2727CONST_PROMPT = "This is a prompt."
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
8177class MockResponse :
8278 """Represents a mocked response."""
Original file line number Diff line number Diff line change 1111from unittest import mock
1212
1313import 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
2323CONST_MODEL_NAME = "odsc-vllm"
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
6157class MockResponse :
6258 """Represents a mocked response."""
You can’t perform that action at this time.
0 commit comments