Browse Source
bpo-38614: Use test.support.SHORT_TIMEOUT constant (GH-17566)
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.pull/17573/head
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 73 additions and 65 deletions
-
2Lib/test/_test_multiprocessing.py
-
4Lib/test/fork_wait.py
-
3Lib/test/signalinterproctester.py
-
14Lib/test/test_asyncio/test_events.py
-
11Lib/test/test_asyncio/test_sslproto.py
-
2Lib/test/test_asyncio/utils.py
-
41Lib/test/test_concurrent_futures.py
-
12Lib/test/test_fork1.py
-
2Lib/test/test_pydoc.py
-
2Lib/test/test_sched.py
-
6Lib/test/test_signal.py
-
2Lib/test/test_socketserver.py
-
2Lib/test/test_ssl.py
-
6Lib/test/test_subprocess.py
-
2Lib/test/test_support.py
-
4Lib/test/test_threading.py
-
6Lib/test/test_wait3.py
-
10Lib/test/test_wait4.py
-
7Misc/NEWS.d/next/Tests/2019-12-10-14-26-23.bpo-38614.89JpNh.rst
@ -1,3 +1,6 @@ |
|||
Replace hardcoded timeout constants in tests with |
|||
:data:`~test.support.LOOPBACK_TIMEOUT` of :mod:`test.support`, so it's easier |
|||
to ajdust this timeout for all tests at once. |
|||
new :mod:`test.support` constants: :data:`~test.support.LOOPBACK_TIMEOUT`, |
|||
:data:`~test.support.INTERNET_TIMEOUT`, :data:`~test.support.SHORT_TIMEOUT` and |
|||
:data:`~test.support.LONG_TIMEOUT`. It becomes easier to adjust these four |
|||
timeout constants for all tests at once, rather than having to adjust every |
|||
single test file. |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue