Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
703c1d1
migrating issue to github
diekmann Apr 10, 2017
78c165a
using subprocess.run to run pty.spawn
diekmann Apr 14, 2017
28e918e
move _mock_stdin_stdout to the actual tests
diekmann Apr 14, 2017
6e7f587
Get os.forkpty disabled again.
diekmann Apr 14, 2017
fd61cad
Yes, way less monkey patching.
diekmann Apr 14, 2017
e9b0b8b
Decoupling PtySpawnTestBase and PtyMockingTestBase
diekmann Apr 14, 2017
a42755b
Move PtyMockingTestBase closer to PtyCopyTests
diekmann Apr 14, 2017
7451f97
Tuned class hierarchy
diekmann Apr 14, 2017
b604d83
fix line length and error path of base classes
diekmann Apr 14, 2017
cbe7d14
clarify difference to alternatives
diekmann Apr 14, 2017
8afd1e7
move disable-os.forkpty-code closer to the test
diekmann Apr 14, 2017
2c3498f
cosmetic changes
diekmann Apr 14, 2017
ec58a62
polish
diekmann Apr 14, 2017
0be6c54
let exceptions out and fail the tests
diekmann Apr 14, 2017
250ae50
Pull related code for select mocking tests together
diekmann Apr 14, 2017
7ced6d8
Tune PtyCopyTests
diekmann Apr 14, 2017
528fc5d
unify code comments in PtySpawnTestBase
diekmann Apr 15, 2017
aeb6585
cosmetic changes
diekmann Apr 15, 2017
57876df
Cleanup of terminal setup code
diekmann Apr 15, 2017
2309d69
removed test_eof_echoctl
diekmann Apr 15, 2017
f93de8d
fixed echoing race
diekmann Apr 15, 2017
9cd9425
cleaned OS X workaround comments
diekmann Apr 15, 2017
a7e4753
Removed doc string from test methods.
diekmann Apr 15, 2017
5944764
Fixed comment
diekmann Apr 15, 2017
851c261
[CONTRIBUTING.rst] Added myself to Misc/ACKS
diekmann Jul 28, 2017
5dbc249
added Chris Torek to ACKS
diekmann Jul 28, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixed echoing race
  • Loading branch information
diekmann committed Jul 28, 2017
commit f93de8d5f32c78f0ad38eec6716618beffbf1957
11 changes: 7 additions & 4 deletions Lib/test/test_pty.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,10 +807,13 @@ def _background_process_intr(to_stdin, from_stdout):
to_slave = b'This buffered stuff will be ignored'+INTR+b' Ohai slave!\n'
pty._writen(to_stdin, to_slave)

expected = INTR+b' Ohai slave!\r\n'
received = _os_read_exactly(from_stdout, len(expected))
if received != expected:
raise RuntimeError("Expecting {!r} but got {!r}".format(expected, received))
expected = b' Ohai slave!\r\n'
# Race: The kernel may or may not echo parts before the INTR. In
# either case, due to canonical mode, the slave will only receive the
# string after INTR.
received = _os_readline(from_stdout)
if not received.endswith(expected):
raise RuntimeError("Expecting to end with {!r} but got {!r}".format(expected, received))

debug("[background] got it back")
return 0
Expand Down