Skip to content

Commit 331f845

Browse files
author
Guido van Rossum
committed
Add reversed version of testErrorInPassTwo
1 parent bb212eb commit 331f845

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

test-data/unit/check-modules.test

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,7 @@ main:1: note: ... from here:
12441244
tmp/a.py: note: In member "f1" of class "C":
12451245
tmp/a.py:4: error: Cannot determine type of 'x2'
12461246

1247-
[case testErrorInPassTwo]
1247+
[case testErrorInPassTwo1]
12481248
import b
12491249
[file a.py]
12501250
import b
@@ -1260,6 +1260,21 @@ main:1: note: ... from here:
12601260
tmp/a.py: note: In function "f":
12611261
tmp/a.py:4: error: Unsupported operand types for + ("int" and "str")
12621262

1263+
[case testErrorInPassTwo2]
1264+
import a
1265+
[file a.py]
1266+
import b
1267+
def f() -> None:
1268+
a = b.x + 1
1269+
a + ''
1270+
[file b.py]
1271+
import a
1272+
x = 1 + 1
1273+
[out]
1274+
main:1: note: In module imported here:
1275+
tmp/a.py: note: In function "f":
1276+
tmp/a.py:4: error: Unsupported operand types for + ("int" and "str")
1277+
12631278
[case testDeferredDecorator]
12641279
import a
12651280
[file a.py]

0 commit comments

Comments
 (0)