Skip to content

Commit 98033ac

Browse files
author
hauntsaninja
committed
fix pathlib tests to not use binary mode
Since errors shouldn't be used with binary modes. Maybe should just delete?
1 parent d9b1f44 commit 98033ac

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test-data/unit/pythoneval.test

+5-5
Original file line numberDiff line numberDiff line change
@@ -313,13 +313,13 @@ _program.py:7: note: Revealed type is 'typing.IO[Any]'
313313
[case testPathOpenReturnTypeInferenceSpecialCases]
314314
from pathlib import Path
315315
p = Path("x")
316-
reveal_type(p.open(mode='rb', errors='replace'))
317-
reveal_type(p.open(errors='replace', mode='rb'))
318-
mode = 'rb'
316+
reveal_type(p.open(mode='r', errors='replace'))
317+
reveal_type(p.open(errors='replace', mode='r'))
318+
mode = 'r'
319319
reveal_type(p.open(mode=mode, errors='replace'))
320320
[out]
321-
_program.py:3: note: Revealed type is 'typing.BinaryIO'
322-
_program.py:4: note: Revealed type is 'typing.BinaryIO'
321+
_program.py:3: note: Revealed type is 'io.TextIOWrapper'
322+
_program.py:4: note: Revealed type is 'io.TextIOWrapper'
323323
_program.py:6: note: Revealed type is 'typing.IO[Any]'
324324

325325
[case testGenericPatterns]

0 commit comments

Comments
 (0)