mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
[3.11] gh-109960: Remove test_pty timeout of 10 seconds (GH-110058) (#110061)
gh-109960: Remove test_pty timeout of 10 seconds (GH-110058) In 2003, test_pty got a hardcoded timeout of 10 seconds to prevent hanging on AIX & HPUX "if run after test_openpty": commit7d8145268e. Since 2003, test_pty was no longer reported to hang on AIX. But today, the test can fail simply because a CI is busy running other tests in parallel. The timeout of 10 seconds is no longer needed, just remove it. Moreover, regrtest now has multiple built-in generic timeout mecanisms. (cherry picked from commit5fdcea7440) Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
d6e8001467
commit
a99729599a
1 changed files with 0 additions and 11 deletions
|
|
@ -80,17 +80,9 @@ def expectedFailureIfStdinIsTTY(fun):
|
|||
# because pty code is not too portable.
|
||||
class PtyTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
old_alarm = signal.signal(signal.SIGALRM, self.handle_sig)
|
||||
self.addCleanup(signal.signal, signal.SIGALRM, old_alarm)
|
||||
|
||||
old_sighup = signal.signal(signal.SIGHUP, self.handle_sighup)
|
||||
self.addCleanup(signal.signal, signal.SIGHUP, old_sighup)
|
||||
|
||||
# isatty() and close() can hang on some platforms. Set an alarm
|
||||
# before running the test to make sure we don't hang forever.
|
||||
self.addCleanup(signal.alarm, 0)
|
||||
signal.alarm(10)
|
||||
|
||||
# Save original stdin window size.
|
||||
self.stdin_dim = None
|
||||
if _HAVE_WINSZ:
|
||||
|
|
@ -101,9 +93,6 @@ def setUp(self):
|
|||
except tty.error:
|
||||
pass
|
||||
|
||||
def handle_sig(self, sig, frame):
|
||||
self.fail("isatty hung")
|
||||
|
||||
@staticmethod
|
||||
def handle_sighup(signum, frame):
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue