Skip to content

Commit 04ad23d

Browse files
committed
Update semanal + merge tests
1 parent 874c44b commit 04ad23d

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

test-data/unit/merge.test

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,31 +1332,33 @@ MypyFile:1<1>(
13321332
[case testMergeTypedDict_symtable]
13331333
import target
13341334
[file target.py]
1335-
from mypy_extensions import TypedDict
1335+
from typing import TypedDict
13361336
class A: pass
13371337
D = TypedDict('D', {'a': A})
13381338
d: D
13391339
[file target.py.next]
1340-
from mypy_extensions import TypedDict
1340+
from typing import TypedDict
13411341
class A: pass
13421342
D = TypedDict('D', {'a': A, 'b': int})
13431343
d: D
13441344
[builtins fixtures/dict.pyi]
1345+
[typing fixtures/typing-typeddict.pyi]
1346+
13451347
[out]
13461348
__main__:
13471349
target: MypyFile<0>
13481350
target:
13491351
A: TypeInfo<1>
13501352
D: TypeInfo<2>
1351-
TypedDict: FuncDef<3>
1353+
TypedDict: Var<3>
13521354
d: Var<4>(TypedDict('target.D', {'a': target.A<1>}))
13531355
==>
13541356
__main__:
13551357
target: MypyFile<0>
13561358
target:
13571359
A: TypeInfo<1>
13581360
D: TypeInfo<2>
1359-
TypedDict: FuncDef<3>
1361+
TypedDict: Var<3>
13601362
d: Var<4>(TypedDict('target.D', {'a': target.A<1>, 'b': builtins.int<5>}))
13611363

13621364
[case testNewType_symtable]

test-data/unit/semanal-typeddict.test

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,43 @@
22

33
-- TODO: Implement support for this syntax.
44
--[case testCanCreateTypedDictTypeWithDictCall]
5-
--from mypy_extensions import TypedDict
5+
--from typing import TypedDict
66
--Point = TypedDict('Point', dict(x=int, y=int))
77
--[builtins fixtures/dict.pyi]
8+
--[typing fixtures/typing-typeddict.pyi]
89
--[out]
910
--MypyFile:1(
10-
-- ImportFrom:1(mypy_extensions, [TypedDict])
11+
-- ImportFrom:1(typing, [TypedDict])
1112
-- AssignmentStmt:2(
1213
-- NameExpr(Point* [__main__.Point])
1314
-- TypedDictExpr:2(Point)))
1415

1516
[case testCanCreateTypedDictTypeWithDictLiteral]
16-
from mypy_extensions import TypedDict
17+
from typing import TypedDict
1718
Point = TypedDict('Point', {'x': int, 'y': int})
1819
[builtins fixtures/dict.pyi]
20+
[typing fixtures/typing-typeddict.pyi]
1921
[out]
2022
MypyFile:1(
21-
ImportFrom:1(mypy_extensions, [TypedDict])
23+
ImportFrom:1(typing, [TypedDict])
2224
AssignmentStmt:2(
2325
NameExpr(Point* [__main__.Point])
2426
TypedDictExpr:2(Point)))
2527

2628
[case testTypedDictWithDocString]
27-
from mypy_extensions import TypedDict
29+
from typing import TypedDict
2830
class A(TypedDict):
2931
"""foo"""
3032
x: str
3133
[builtins fixtures/dict.pyi]
34+
[typing fixtures/typing-typeddict.pyi]
3235
[out]
3336
MypyFile:1(
34-
ImportFrom:1(mypy_extensions, [TypedDict])
37+
ImportFrom:1(typing, [TypedDict])
3538
ClassDef:2(
3639
A
3740
BaseType(
38-
mypy_extensions._TypedDict)
41+
typing._TypedDict)
3942
ExpressionStmt:3(
4043
StrExpr(foo))
4144
AssignmentStmt:4(

0 commit comments

Comments
 (0)