cpython/Lib/test/test_pyrepl
Victor Stinner a75676bf6c
[3.13] gh-135329: Use longer timeout in pyrepl test_repl_eio() (#139503) (#139507)
gh-135329: Use longer timeout in pyrepl test_repl_eio() (#139503)

Replace hardcoded 5 seconds with support.SHORT_TIMEOUT.

Fix the following error on slow CI such as GitHub Action UBSan:

test test_pyrepl failed -- Traceback (most recent call last):
  File "Lib/test/test_pyrepl/test_unix_console.py", line 362, in test_repl_eio
    _, err = proc.communicate(timeout=5)  # sleep for pty to settle
             ~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "Lib/subprocess.py", line 1219, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)
                     ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "Lib/subprocess.py", line 2126, in _communicate
    self._check_timeout(endtime, orig_timeout, stdout, stderr)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "Lib/subprocess.py", line 1266, in _check_timeout
    raise TimeoutExpired(
    ...<2 lines>...
            stderr=b''.join(stderr_seq) if stderr_seq else None)
subprocess.TimeoutExpired: Command '[...]' timed out after 5 seconds

(cherry picked from commit c985822d86)
2025-10-02 15:08:42 +00:00
..
__init__.py [3.13] gh-111201: Support pyrepl on Windows (GH-119559) (GH-119850) 2024-05-31 17:18:28 +02:00
__main__.py
eio_test_script.py [3.13] gh-135329: prevent infinite traceback loop on Ctrl-C for strace (#138974) 2025-09-16 15:17:36 +02:00
support.py [3.13] gh-131507: Clean up tests and type checking for _pyrepl (GH-131509) (GH-131546) 2025-03-21 17:25:45 +01:00
test_eventqueue.py [3.13] gh-131878: Fix input of unicode characters with two or more code points in new pyrepl on Windows (gh-131901) (gh-133468) 2025-05-05 23:08:09 +02:00
test_input.py
test_interact.py [3.13] gh-117174: Adapt test_multiple_statements_fail_early to new REPL behavior (follow-up gh-131065) (GH-131836) (#131841) 2025-03-28 16:51:04 +00:00
test_keymap.py [3.13] gh-119357: Increase test coverage for keymap in _pyrepl (GH-119358) (#119414) 2024-05-22 23:13:01 +02:00
test_pyrepl.py [3.13] gh-130999: Avoid exiting the new REPL when there are non-string candidates for suggestions (gh-131001) (gh-135020) 2025-06-02 16:58:29 +02:00
test_reader.py [3.13] gh-131507: Clean up tests and type checking for _pyrepl (GH-131509) (GH-131546) 2025-03-21 17:25:45 +01:00
test_unix_console.py [3.13] gh-135329: Use longer timeout in pyrepl test_repl_eio() (#139503) (#139507) 2025-10-02 15:08:42 +00:00
test_utils.py [3.13] gh-126332: Add tests for _pyrepl.utils (GH-129325) (#130414) 2025-02-21 17:22:42 +00:00
test_windows_console.py [3.13] GH-132439: Fix REPL swallowing characters entered with AltGr on cmd.exe (GH-132440) (GH-133460) 2025-05-05 20:09:34 +02:00