bpo-29070: Integration tests for pty module with patch from bpo-26228 by diekmann · Pull Request #2932 · python/cpython
TL;DR: Fix issue and add huge test suite for pty.py.
Some development of a test suite with integration tests for the pty module happened over several months in the python bug tracker (when python was still on mercurial). Martin Panter already did some awesome review of the code, unfortunately he is currently unavailable and nothing happened in the bug tracker for some months. This is the github pull request of the test suite.
Summary what happened so far:
- Chris Torek observed and fixed a bug in the pty module bpo-26228. People seem to agree about the bug and that the patch by Chris solves the problem. However, it was never merged, probably due to missing test cases.
- Independently, I wrote a kind-of-large test suite and integration tests for the pty module bpo-29070. Martin Panter and Xavier de Gaye helped improving the code. Some comments are still in the review tool.
- Just a test suite for the pty module cannot be merged because the tests fail on Mac OS, FreeBSD, ... This is why I include Chris Torek's patch into this pull request. On all systems I could test on, the test suite passes (but I cannot rule out that there are some strange UNIX flavors where we will uncover issues).
If this gets merged, we can close two bpo issues and finally have a nice pty test suite, something that is missing for a long time.
Contributors: Patch from Chris Torek [bpo-26228] is included in this pull request! I added him to the ACKS, but I'm not sure if he wants to appear there.