File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 6
6
import asyncio
7
7
import contextlib
8
8
import re
9
+ import sys
9
10
import uuid
10
11
from collections .abc import Callable
11
12
from dataclasses import dataclass , field
17
18
from pydantic_ai import Agent
18
19
from pydantic_ai .models .test import TestModel
19
20
21
+ has_required_python : bool = sys .version_info >= (3 , 10 )
20
22
has_ag_ui : bool = False
21
23
with contextlib .suppress (ImportError ):
22
24
from ag_ui .core import (
41
43
has_ag_ui = True
42
44
43
45
44
- pytestmark = [pytest .mark .anyio , pytest .mark .skipif (not has_ag_ui , reason = 'adapter-ag-ui not installed' )]
46
+ pytestmark = [
47
+ pytest .mark .anyio ,
48
+ pytest .mark .skipif (not has_ag_ui , reason = 'adapter-ag-ui not installed' ),
49
+ pytest .mark .skipif (not has_required_python , reason = 'requires Python 3.10 or higher' ),
50
+ ]
45
51
46
52
# Type aliases.
47
53
_MockUUID = Callable [[], str ]
Original file line number Diff line number Diff line change 4
4
5
5
import contextlib
6
6
import logging
7
+ import sys
7
8
from dataclasses import dataclass , field
8
9
from typing import Final
9
10
12
13
from pydantic_ai import Agent
13
14
from pydantic_ai .models .test import TestModel
14
15
16
+ has_required_python : bool = sys .version_info >= (3 , 10 )
15
17
has_ag_ui : bool = False
16
18
with contextlib .suppress (ImportError ):
17
19
from adapter_ag_ui .adapter import _LOGGER as adapter_logger , AdapterAGUI # type: ignore[reportPrivateUsage]
22
24
pytestmark = [
23
25
pytest .mark .anyio ,
24
26
pytest .mark .skipif (not has_ag_ui , reason = 'adapter-ag-ui not installed' ),
27
+ pytest .mark .skipif (not has_required_python , reason = 'requires Python 3.10 or higher' ),
25
28
]
26
29
27
30
# Constants.
You can’t perform that action at this time.
0 commit comments