Skip to content

Commit e80585a

Browse files
remove open() pythoneval test (python#8908)
python/typeshed#3371 causes this to produce a different error message. open() with no arguments doesn't seem like an important use case, so testing for it explicitly in pythoneval isn't all that useful.
1 parent 07c9f6f commit e80585a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

test-data/unit/pythoneval.test

+2-5
Original file line numberDiff line numberDiff line change
@@ -287,17 +287,14 @@ _program.py:3: note: Revealed type is 'typing.BinaryIO'
287287
_program.py:5: note: Revealed type is 'typing.IO[Any]'
288288

289289
[case testOpenReturnTypeInferenceSpecialCases]
290-
reveal_type(open())
291290
reveal_type(open(mode='rb', file='x'))
292291
reveal_type(open(file='x', mode='rb'))
293292
mode = 'rb'
294293
reveal_type(open(mode=mode, file='r'))
295294
[out]
296-
_testOpenReturnTypeInferenceSpecialCases.py:1: error: Too few arguments for "open"
297-
_testOpenReturnTypeInferenceSpecialCases.py:1: note: Revealed type is 'typing.TextIO'
295+
_testOpenReturnTypeInferenceSpecialCases.py:1: note: Revealed type is 'typing.BinaryIO'
298296
_testOpenReturnTypeInferenceSpecialCases.py:2: note: Revealed type is 'typing.BinaryIO'
299-
_testOpenReturnTypeInferenceSpecialCases.py:3: note: Revealed type is 'typing.BinaryIO'
300-
_testOpenReturnTypeInferenceSpecialCases.py:5: note: Revealed type is 'typing.IO[Any]'
297+
_testOpenReturnTypeInferenceSpecialCases.py:4: note: Revealed type is 'typing.IO[Any]'
301298

302299
[case testPathOpenReturnTypeInference]
303300
from pathlib import Path

0 commit comments

Comments
 (0)