8000 Fix pythoneval tests · python/mypy@68c34da · GitHub
[go: up one dir, main page]

Skip to content

Commit 68c34da

Browse files
committed
Fix pythoneval tests
1 parent 94ca227 commit 68c34da

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

test-data/unit/pythoneval.test

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ f.write('x')
283283
f.write(b'x')
284284
f.foobar()
285285
[out]
286-
_program.py:3: error: Argument 1 to "write" of "TextIOBase" has incompatible type "bytes"; expected "str"
286+
_program.py:3: error: Argument 1 to "write" of "_TextIOBase" has incompatible type "bytes"; expected "str"
287287
_program.py:4: error: "TextIOWrapper[_WrappedBuffer]" has no attribute "foobar"
288288

289289
[case testOpenReturnTypeInference]
@@ -293,9 +293,9 @@ reveal_type(open('x', 'rb'))
293293
mode = 'rb'
294294
reveal_type(open('x', mode))
295295
[out]
296-
_program.py:1: note: Revealed type is "io.TextIOWrapper[io._WrappedBuffer]"
297-
_program.py:2: note: Revealed type is "io.TextIOWrapper[io._WrappedBuffer]"
298-
_program.py:3: note: Revealed type is "io.BufferedReader"
296+
_program.py:1: note: Revealed type is "_io.TextIOWrapper[_io._WrappedBuffer]"
297+
_program.py:2: note: Revealed type is "_io.TextIOWrapper[_io._WrappedBuffer]"
298+
_program.py:3: note: Revealed type is "_io.BufferedReader"
299299< 8000 code class="diff-text syntax-highlighted-line">
_program.py:5: note: Revealed type is "typing.IO[Any]"
300300

301301
[case testOpenReturnTypeInferenceSpecialCases]
@@ -304,8 +304,8 @@ reveal_type(open(file='x', mode='rb'))
304304
mode = 'rb'
305305
reveal_type(open(mode=mode, file='r'))
306306
[out]
307-
_testOpenReturnTypeInferenceSpecialCases.py:1: note: Revealed type is "io.BufferedReader"
308-
_testOpenReturnTypeInferenceSpecialCases.py:2: note: Revealed type is "io.BufferedReader"
307+
_testOpenReturnTypeInferenceSpecialCases.py:1: note: Revealed type is "_io.BufferedReader"
308+
_testOpenReturnTypeInferenceSpecialCases.py:2: note: Revealed type is "_io.BufferedReader"
309309
_testOpenReturnTypeInferenceSpecialCases.py:4: note: Revealed type is "typing.IO[Any]"
310310

311311
[case testPathOpenReturnTypeInference]
@@ -317,9 +317,9 @@ reveal_type(p.open('rb'))
317317
mode = 'rb'
318318
reveal_type(p.open(mode))
319319
[out]
320-
_program.py:3: note: Revealed type is "io.TextIOWrapper[io._WrappedBuffer]"
321-
_program.py:4: note: Revealed type is "io.TextIOWrapper[io._WrappedBuffer]"
322-
_program.py:5: note: Revealed type is "io.BufferedReader"
320+
_program.py:3: note: Revealed type is "_io.TextIOWrapper[_io._WrappedBuffer]"
321+
_program.py:4: note: Revealed type is "_io.TextIOWrapper[_io._WrappedBuffer]"
322+
_program.py:5: note: Revealed type is "_io.BufferedReader"
323323
_program.py:7: note: Revealed type is "typing.IO[Any]"
324324

325325
[case testPathOpenReturnTypeInferenceSpecialCases]
@@ -330,8 +330,8 @@ reveal_type(p.open(errors='replace', mode='r'))
330330
mode = 'r'
331331
reveal_type(p.open(mode=mode, errors='replace'))
332332
[out]
333-
_program.py:3: note: Revealed type is "io.TextIOWrapper[io._WrappedBuffer]"
334-
_program.py:4: note: Revealed type is "io.TextIOWrapper[io._WrappedBuffer]"
333+
_program.py:3: note: Revealed type is "_io.TextIOWrapper[_io._WrappedBuffer]"
334+
_program.py:4: note: Revealed type is "_io.TextIOWrapper[_io._WrappedBuffer]"
335335
_program.py:6: note: Revealed type is "typing.IO[Any]"
336336

337337
[case testGenericPatterns]

0 commit comments

Comments
 (0)
0