Skip to content

Commit 777e4c3

Browse files
committed
test: restructure to run with correct python version
1 parent e3a9a3d commit 777e4c3

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

test-data/unit/check-python312.test

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2168,3 +2168,13 @@ x: MyTuple[int, str]
21682168
reveal_type(x[0]) # N: Revealed type is "Any"
21692169
[builtins fixtures/tuple.pyi]
21702170
[typing fixtures/typing-full.pyi]
2171+
2172+
[case testAnnotatedWithCallableAsParameterTypeKeyword]
2173+
from typing_extensions import Annotated
2174+
2175+
def something() -> None: ...
2176+
2177+
type A = list[Annotated[str, something()]]
2178+
a: A
2179+
reveal_type(a) # N: Revealed type is "builtins.list[builtins.str]"
2180+
[builtins fixtures/tuple.pyi]

test-data/unit/check-type-aliases.test

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,24 +1319,12 @@ from typing_extensions import TypeAlias
13191319
Foo: TypeAlias = ClassVar[int] # E: ClassVar[...] can't be used inside a type alias
13201320
[builtins fixtures/tuple.pyi]
13211321

1322-
[case testAnnotatedWithCallableAsParameterTypeKeyword]
1323-
# flags: --python-version 3.12
1324-
from typing_extensions import Annotated
1325-
1326-
def something() -> None: ...
1327-
1328-
type A = list[Annotated[str, something()]]
1329-
a: A
1330-
reveal_type(a) # N: Revealed type is "builtins.list[builtins.str]"
1331-
[builtins fixtures/tuple.pyi]
1332-
13331322
[case testAnnotatedWithCallableAsParameterTypeAlias]
1334-
# flags: --python-version 3.12
13351323
from typing_extensions import Annotated, TypeAlias
13361324

13371325
def something() -> None: ...
13381326

1339-
B: TypeAlias = list[Annotated[str, something()]]
1340-
b: B
1341-
reveal_type(b) # N: Revealed type is "builtins.list[builtins.str]"
1327+
A: TypeAlias = list[Annotated[str, something()]]
1328+
a: A
1329+
reveal_type(a) # N: Revealed type is "builtins.list[builtins.str]"
13421330
[builtins fixtures/tuple.pyi]

0 commit comments

Comments
 (0)