]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-38614: Use test.support.SHORT_TIMEOUT constant (GH-17566)
authorVictor Stinner <vstinner@python.org>
Wed, 11 Dec 2019 10:30:03 +0000 (11:30 +0100)
committerGitHub <noreply@github.com>
Wed, 11 Dec 2019 10:30:03 +0000 (11:30 +0100)
commit0d63bacefd2e5b937ec6b0ec3053777c09941b4a
tree638bde819a554379c8c5aff31ba8d6a1feeb1db1
parentb7a0109cd2bafaa21a4d50aad307e901c68f9156
bpo-38614: Use test.support.SHORT_TIMEOUT constant (GH-17566)

Replace hardcoded timeout constants in tests with SHORT_TIMEOUT of
test.support, so it's easier to ajdust this timeout for all tests at
once.

SHORT_TIMEOUT is 30 seconds by default, but it can be longer
depending on --timeout command line option.

The change makes almost all timeouts longer, except
test_reap_children() of test_support which is made 2x shorter:
SHORT_TIMEOUT should be enough. If this test starts to fail,
LONG_TIMEOUT should be used instead.

Uniformize also "from test import support" import in some test files.
19 files changed:
Lib/test/_test_multiprocessing.py
Lib/test/fork_wait.py
Lib/test/signalinterproctester.py
Lib/test/test_asyncio/test_events.py
Lib/test/test_asyncio/test_sslproto.py
Lib/test/test_asyncio/utils.py
Lib/test/test_concurrent_futures.py
Lib/test/test_fork1.py
Lib/test/test_pydoc.py
Lib/test/test_sched.py
Lib/test/test_signal.py
Lib/test/test_socketserver.py
Lib/test/test_ssl.py
Lib/test/test_subprocess.py
Lib/test/test_support.py
Lib/test/test_threading.py
Lib/test/test_wait3.py
Lib/test/test_wait4.py
Misc/NEWS.d/next/Tests/2019-12-10-14-26-23.bpo-38614.89JpNh.rst