Commit Graph

23 Commits

Author SHA1 Message Date
Nikita Sobolev 57463d43dc
gh-90808: add more examples to `test_sched.test_priority` (#31144) 2022-09-20 18:34:13 -07:00
Christian Heimes 2b16a08bc7
bpo-40280: Detect missing threading on WASM platforms (GH-32352)
Co-authored-by: Brett Cannon <brett@python.org>
2022-04-07 09:22:47 +02:00
Bar Harel 5368c2b6e2
bpo-19270: Fixed sched.scheduler.cancel to cancel correct event (GH-22729) 2020-10-19 10:33:43 +03:00
Hai Shi e80697d687
bpo-40275: Adding threading_helper submodule in test.support (GH-20263) 2020-05-28 00:10:27 +02:00
Victor Stinner 0d63bacefd
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.
2019-12-11 11:30:03 +01:00
Victor Stinner bbc8b7965b
bpo-38614: Use default join_thread() timeout in tests (GH-17559)
Tests no longer pass a timeout value to join_thread() of
test.support: use the default join_thread() timeout instead
(SHORT_TIMEOUT constant of test.support).
2019-12-10 20:41:23 +01:00
Victor Stinner b9b69003d9 bpo-31234: Add support.join_thread() helper (#3587)
join_thread() joins a thread but raises an AssertionError if the
thread is still alive after timeout seconds.
2017-09-14 14:40:56 -07:00
Antoine Pitrou a6a4dc816d bpo-31370: Remove support for threads-less builds (#3385)
* Remove Setup.config
* Always define WITH_THREAD for compatibility.
2017-09-07 18:56:24 +02:00
Raymond Hettinger 6b3481c4ed Issue #5830: Add test for ee476248a74a. (Contributed by Serhiy Storchaka.) 2016-11-21 16:48:10 -08:00
Serhiy Storchaka 597d15afe4 Issue #23277: Remove unused support.run_unittest import. 2016-04-24 13:45:58 +03:00
Serhiy Storchaka 8f8ec92de8 Issue #19936: Added executable bits or shebang lines to Python scripts which
requires them.  Disable executable bits and shebang lines in test and
benchmark files in order to prevent using a random system python, and in
source files of modules which don't provide command line interface.  Fixed
shebang lines in the unittestgui and checkpip scripts.
2014-01-16 17:33:23 +02:00
Serhiy Storchaka b992a0e102 Issue #19936: Added executable bits or shebang lines to Python scripts which
requires them.  Disable executable bits and shebang lines in test and
benchmark files in order to prevent using a random system python, and in
source files of modules which don't provide command line interface.  Fixed
shebang line to use python3 executable in the unittestgui script.
2014-01-16 17:15:49 +02:00
Raymond Hettinger 468bcaffd6 merge 2013-07-13 22:48:49 -07:00
Raymond Hettinger 889b92d3aa Issue #18432: Fix unintended API change in the sched module 2013-07-13 22:42:09 -07:00
Brett Cannon 3e9a9ae09d Update various test modules to use unittest.main() for test discovery
instead of manually listing tests for test.support.run_unittest().
2013-06-12 21:25:59 -04:00
Serhiy Storchaka 369a7822d6 Issue #16843: Make concurrent tests for sched module deterministic. 2013-01-09 00:13:38 +02:00
Serhiy Storchaka f2b9cf4e61 Issue #16165: Fix sched.scheduler.run() method was block a scheduler for
other threads.
2012-12-29 21:34:11 +02:00
Charles-François Natali 4a72ebe34b Issue #13878: Fix random test_sched failures. 2012-02-16 19:51:45 +01:00
Charles-François Natali f670ca5e70 Issue #13878: Fix random test_sched failures. 2012-02-16 19:49:48 +01:00
Giampaolo Rodola' 556ba04a8d Fix #13449: add 'blocking' parameter to sched.scheduler.run() so that the scheduler can be used in non-blocking applications 2011-12-14 14:38:45 +01:00
Giampaolo Rodola' 6a5dcd4b2a sched.py: fix test_queue by making sure that queue property returns an orderd list of upcoming events 2011-11-26 12:17:42 +01:00
Giampaolo Rodola' be55d99b3d Fix 13245:
sched.scheduler class constructor's timefunc and delayfunct parameters are now optional.
scheduler.enter and scheduler.enterabs methods gained a new kwargs parameter.

Patch contributed by Matt Mulsow.
2011-11-22 13:33:34 +01:00
Giampaolo Rodolà b5c23761d3 issue #8687: provides a test suite for sched.py module 2010-08-04 09:28:05 +00:00