Skip to content

Commit bb212eb

Browse files
author
Guido van Rossum
committed
Remove --hide-error-context from new tests and adjust expected output
1 parent 19345a0 commit bb212eb

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

test-data/unit/check-modules.test

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,6 @@ main:2: error: Revealed type is 'builtins.str'
11891189
-- Tests for cross-module second_pass checking.
11901190

11911191
[case testSymmetricImportCycle1]
1192-
# flags: --hide-error-context
11931192
import a
11941193
[file a.py]
11951194
import b
@@ -1203,10 +1202,12 @@ def g() -> int:
12031202
return a.y
12041203
x = 1 + 1
12051204
[out]
1205+
tmp/a.py:1: note: In module imported here,
1206+
main:1: note: ... from here:
1207+
tmp/b.py: note: In function "g":
12061208
tmp/b.py:3: error: Revealed type is 'builtins.int'
12071209

12081210
[case testSymmetricImportCycle2]
1209-
# flags: --hide-error-context
12101211
import b
12111212
[file a.py]
12121213
import b
@@ -1220,10 +1221,12 @@ def g() -> int:
12201221
return a.y
12211222
x = 1 + 1
12221223
[out]
1224+
tmp/b.py:1: note: In module imported here,
1225+
main:1: note: ... from here:
1226+
tmp/a.py: note: In function "f":
12231227
tmp/a.py:3: error: Revealed type is 'builtins.int'
12241228

12251229
[case testThreePassesRequired]
1226-
# flags: --hide-error-context
12271230
import b
12281231
[file a.py]
12291232
import b
@@ -1236,10 +1239,12 @@ class C:
12361239
import a
12371240
b = 1 + 1
12381241
[out]
1242+
tmp/b.py:1: note: In module imported here,
1243+
main:1: note: ... from here:
1244+
tmp/a.py: note: In member "f1" of class "C":
12391245
tmp/a.py:4: error: Cannot determine type of 'x2'
12401246

12411247
[case testErrorInPassTwo]
1242-
# flags: --hide-error-context
12431248
import b
12441249
[file a.py]
12451250
import b
@@ -1250,10 +1255,12 @@ def f() -> None:
12501255
import a
12511256
x = 1 + 1
12521257
[out]
1258+
tmp/b.py:1: note: In module imported here,
1259+
main:1: note: ... from here:
1260+
tmp/a.py: note: In function "f":
12531261
tmp/a.py:4: error: Unsupported operand types for + ("int" and "str")
12541262

12551263
[case testDeferredDecorator]
1256-
# flags: --hide-error-context
12571264
import a
12581265
[file a.py]
12591266
import b
@@ -1285,4 +1292,3 @@ pass
12851292
[file b]
12861293
pass
12871294
[out]
1288-

0 commit comments

Comments
 (0)