homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients eryksun, paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware
Date 2020年09月08日.04:10:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1599538202.61.0.925984161349.issue41729@roundup.psfhosted.org>
In-reply-to
Content
After splitting the two reads onto two lines, the indefinite hang happens in the second one, stdin.readall. 
 def test_ctrl_z(self):
 with open('CONIN$', 'rb', buffering=0) as stdin:
 source = '\xC4\x1A\r\n'.encode('utf-16-le')
 expected = '\xC4'.encode('utf-8')
 print('here')
 write_input(stdin, source)
 a = stdin.read(1)
## b = stdin.readall()
 self.assertEqual(expected[0:1], a)
## self.assertEqual(expected[1:], b)
The resulting failure of the first assertion results in:
FAIL: test_ctrl_z (__main__.WindowsConsoleIOTests)
----------------------------------------------------------------------
Traceback (most recent call last):
 File "F:\dev3円x\lib\test\test_winconsoleio.py", line 197, in test_ctrl_z
 self.assertEqual(expected[0:1], a)
AssertionError: b'\xc3' != b'\r'
This minimal change would stop the hang crash, which is the first priority. However, changing the repeat from 10 to 1, to look like
 prec->Event.KeyEvent.wRepeatCount = 1;
fixes all failures, including the hang. I will submit for CI testing.
But two questions.
Is this line needed with a repeat of 1, or should it be removed?
Also, this file has a section added by arg clinic. Does it need to be regenerated for this change? If so, how?
History
Date User Action Args
2020年09月08日 04:10:02terry.reedysetrecipients: + terry.reedy, paul.moore, tim.golden, zach.ware, eryksun, steve.dower
2020年09月08日 04:10:02terry.reedysetmessageid: <1599538202.61.0.925984161349.issue41729@roundup.psfhosted.org>
2020年09月08日 04:10:02terry.reedylinkissue41729 messages
2020年09月08日 04:10:02terry.reedycreate

AltStyle によって変換されたページ (->オリジナル) /