(self, code)
| 64 | # CREATE_NEW_CONSOLE creates a "popup" window. |
| 65 | @requires_resource('gui') |
| 66 | def run_in_separated_process(self, code): |
| 67 | # Run test in a separated process to avoid stdin conflicts. |
| 68 | # See: gh-110147 |
| 69 | cmd = [sys.executable, '-c', code] |
| 70 | subprocess.run(cmd, check=True, capture_output=True, |
| 71 | creationflags=subprocess.CREATE_NEW_CONSOLE) |
| 72 | |
| 73 | def test_kbhit(self): |
| 74 | code = dedent(''' |
no test coverage detected