gh-115538: Emit warning when use bool as fd in _io.WindowsConsoleIO#116925
gh-115538: Emit warning when use bool as fd in _io.WindowsConsoleIO#116925serhiy-storchaka merged 6 commits intopython:mainfrom
Conversation
serhiy-storchaka
left a comment
There was a problem hiding this comment.
Could you please add explicit tests for passing boolean to _WindowsConsoleIO constructor?
There are tests that pass 0 and 1 to _WindowsConsoleIO constructor in Lib/test/test_winconsoleio.py. You can add new tests for booleans there.
|
Thank you for the review, test case added. The |
Lib/test/test_winconsoleio.py
Outdated
| with warnings.catch_warnings(): | ||
| warnings.simplefilter("error", RuntimeWarning) |
There was a problem hiding this comment.
It should not be needed if assertRaises is used.
There was a problem hiding this comment.
I tested and found that these two lines are needed. However, I noticed that there is an assertWarns function which does not require these two lines.
The original code is copied from existing codes, so maybe we should update them later.
Uh oh!
There was an error while loading. Please reload this page.