Issue28217
Created on 2016-09-20 17:44 by steve.dower, last changed 2022-04-11 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| conin.py | eryksun, 2016-09-20 22:46 | |||
| conout.py | eryksun, 2016-09-20 22:47 | |||
| 28217_1.patch | steve.dower, 2016-09-30 17:14 | review | ||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 552 | closed | dstufft, 2017-03-31 16:36 | |
| Messages (4) | |||
|---|---|---|---|
| msg277049 - (view) | Author: Steve Dower (steve.dower) * | Date: 2016-09-20 17:44 | |
We can test the interactive console by opening new console buffers (CONIN$ and CONOUT$) in the test process, then creating a subprocess with those set as the standard handles. Now we can use WriteConsoleInput from the test process to simulate the user typing at the console. This would be useful for verifying that Unicode support works properly and that the interactive mode behaves correctly. |
|||
| msg277078 - (view) | Author: Eryk Sun (eryksun) * | Date: 2016-09-20 22:46 | |
Here's the ctypes code (mentioned on issue 1602) for writing to the input buffer and reading from the screen buffer. For output testing I also have a context manager to create and temporarily activate a new screen buffer with a given number of columns and rows and filled with a particular character (e.g. NUL), which makes it easier to read the output up to the current cursor position. Activating the new screen can be factored out if you're just testing a child writing to stdout. I added the screen activation part in order to read the output from a program that was stubbornly writing to CONOUT$, ignoring the pipe that was passed as stdout. |
|||
| msg277763 - (view) | Author: Steve Dower (steve.dower) * | Date: 2016-09-30 17:14 | |
Added my work on this so far. I've only done input testing, but that's the more important one anyway in my opinion. Feel free to suggest more edge cases we ought to test and I'll try and get to adding them before b2. |
|||
| msg277963 - (view) | Author: Roundup Robot (python-dev) | Date: 2016-10-03 16:12 | |
New changeset 363888141f41 by Steve Dower in branch '3.6': Issue #28217: Adds _testconsole module to test console input. Fixes some issues found by the tests. https://hg.python.org/cpython/rev/363888141f41 New changeset 3ec6a610e93e by Steve Dower in branch 'default': Issue #28217: Adds _testconsole module to test console input. https://hg.python.org/cpython/rev/3ec6a610e93e |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:37 | admin | set | github: 72404 |
| 2017-03-31 16:36:19 | dstufft | set | pull_requests: + pull_request931 |
| 2016-10-03 16:13:41 | steve.dower | set | status: open -> closed resolution: fixed stage: test needed -> resolved |
| 2016-10-03 16:12:55 | python-dev | set | nosy:
+ python-dev messages: + msg277963 |
| 2016-09-30 17:15:04 | steve.dower | set | files:
+ 28217_1.patch keywords: + patch messages: + msg277763 |
| 2016-09-28 15:19:58 | steve.dower | set | assignee: steve.dower |
| 2016-09-20 22:47:45 | eryksun | set | files: + conout.py |
| 2016-09-20 22:46:24 | eryksun | set | files:
+ conin.py nosy: + eryksun messages: + msg277078 |
| 2016-09-20 17:45:06 | steve.dower | link | issue1602 superseder |
| 2016-09-20 17:44:27 | steve.dower | create | |