mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
bpo-31966: Fixed WindowsConsoleIO.write() for writing empty data. (GH-5754)
This commit is contained in:
parent
aef1283ba4
commit
42c35d9c0c
3 changed files with 8 additions and 0 deletions
|
@ -121,6 +121,10 @@ class WindowsConsoleIOTests(unittest.TestCase):
|
|||
else:
|
||||
self.assertNotIsInstance(f, ConIO)
|
||||
|
||||
def test_write_empty_data(self):
|
||||
with ConIO('CONOUT$', 'w') as f:
|
||||
self.assertEqual(f.write(b''), 0)
|
||||
|
||||
def assertStdinRoundTrip(self, text):
|
||||
stdin = open('CONIN$', 'r')
|
||||
old_stdin = sys.stdin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue