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 11
11
from unittest import mock
12
12
13
13
import pytest
14
+
15
+
16
+ if sys .version_info < (3 , 9 ):
17
+ pytest .skip (allow_module_level = True )
18
+
14
19
from langchain_core .messages import AIMessage , AIMessageChunk
15
20
from requests .exceptions import HTTPError
16
21
17
22
from ads .llm import ChatOCIModelDeploymentVLLM , ChatOCIModelDeploymentTGI
18
23
19
24
20
- pytestmark = pytest .mark .skipif (
21
- sys .version_info < (3 , 9 ), reason = "Requires Python 3.9 or higher"
22
- )
23
-
24
-
25
25
CONST_MODEL_NAME = "odsc-vllm"
26
26
CONST_ENDPOINT = "https://oci.endpoint/ocid/predict"
27
27
CONST_PROMPT = "This is a prompt."
73
73
for delta in CONST_STREAM_DELTAS
74
74
)
75
75
76
- pytestmark = pytest .mark .skipif (
77
- sys .version_info < (3 , 9 ), reason = "Requires Python 3.9 or higher"
78
- )
79
-
80
76
81
77
class MockResponse :
82
78
"""Represents a mocked response."""
Original file line number Diff line number Diff line change 11
11
from unittest import mock
12
12
13
13
import pytest
14
- from requests .exceptions import HTTPError
15
14
16
- from ads .llm import OCIModelDeploymentTGI , OCIModelDeploymentVLLM
15
+ if sys .version_info < (3 , 9 ):
16
+ pytest .skip (allow_module_level = True )
17
17
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
21
21
22
22
23
23
CONST_MODEL_NAME = "odsc-vllm"
53
53
for word in CONST_COMPLETION .split (" " )
54
54
)
55
55
56
- pytestmark = pytest .mark .skipif (
57
- sys .version_info < (3 , 9 ), reason = "Requires Python 3.9 or higher"
58
- )
59
-
60
56
61
57
class MockResponse :
62
58
"""Represents a mocked response."""
You can’t perform that action at this time.
0 commit comments