summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-05-15 03:59:59 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-05-15 03:59:59 (GMT)
commit3e2a0715d73011682956c5a397b35efc2377d6d4 (patch)
tree9427148f7c8121857d9a2842c87d3a75f1141a81 /Lib/test
parent3712686956b2bf9e3c98f394a1a27f99fafdbaa8 (diff)
downloadcpython-3e2a0715d73011682956c5a397b35efc2377d6d4.zip
cpython-3e2a0715d73011682956c5a397b35efc2377d6d4.tar.gz
cpython-3e2a0715d73011682956c5a397b35efc2377d6d4.tar.bz2
Issue #26870: Temporary debugging for OS X Snow Leopard lockup
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_readline.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_readline.py b/Lib/test/test_readline.py
index 372b055..cfb4af1 100644
--- a/Lib/test/test_readline.py
+++ b/Lib/test/test_readline.py
@@ -9,7 +9,7 @@ import subprocess
import sys
import tempfile
import unittest
-from test.support import import_module, unlink
+from test.support import import_module, unlink, get_original_stdout
from test.support.script_helper import assert_python_ok
# Skip tests if there is no readline module
@@ -131,20 +131,25 @@ def run_pty(script, input=b"dummy input\r"):
sel.register(master, selectors.EVENT_READ | selectors.EVENT_WRITE)
os.set_blocking(master, False)
while True:
+ get_original_stdout().write(f"test_readline: select()\n")
for [_, events] in sel.select():
if events & selectors.EVENT_READ:
try:
+ get_original_stdout().write(f"test_readline: read()\n")
chunk = os.read(master, 0x10000)
except OSError as err:
# Linux raises EIO when the slave is closed
if err.errno != EIO:
raise
chunk = b""
+ get_original_stdout().write(f"test_readline: read {chunk!r}\n")
if not chunk:
return output
output.extend(chunk)
if events & selectors.EVENT_WRITE:
+ get_original_stdout().write(f"test_readline: write()\n")
input = input[os.write(master, input):]
+ get_original_stdout().write(f"test_readline: remaining input = {input!r}\n")
if not input:
sel.modify(master, selectors.EVENT_READ)