Skip to content

Commit 6561b5f

Browse files
committed
gh-155432: strengthen SIGCONT prompt test
1 parent 97dc8c0 commit 6561b5f

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎Lib/test/test_pyrepl/test_unix_console.py‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,10 +377,15 @@ def test_sigcont_redraws_prompt(self, _os_write):
377377
reader.prepare()
378378
reader.refresh()
379379

380+
_os_write.reset_mock()
381+
380382
console._sigcont_handler(signal.SIGCONT, None)
381-
reader.handle1(block=False)
383+
self.assertTrue(reader.handle1(block=False))
382384

383-
self.assertEqual(reader.screen, [">>> "])
385+
self.assertIn(
386+
b">>> ",
387+
b"".join(c.args[1] for c in _os_write.mock_calls),
388+
)
384389
console.restore()
385390

386391
def test_getheightwidth_with_invalid_environ(self, _os_write):

0 commit comments

Comments
 (0)