diff --git a/Lib/test/test_concurrent_futures.py b/Lib/test/test_concurrent_futures.py index 0f0ea6190def06..df23b569b0411d 100644 --- a/Lib/test/test_concurrent_futures.py +++ b/Lib/test/test_concurrent_futures.py @@ -33,10 +33,8 @@ import multiprocessing as mp -if support.check_sanitizer(address=True, memory=True): - # gh-90791: Skip the test because it is too slow when Python is built - # with ASAN/MSAN: between 5 and 20 minutes on GitHub Actions. - raise unittest.SkipTest("test too slow on ASAN/MSAN build") +# This test spawns many threads and processes and is slow +support.requires('cpu') def create_future(state=PENDING, exception=None, result=None): diff --git a/Lib/test/test_multiprocessing_spawn.py b/Lib/test/test_multiprocessing_spawn.py index 6558952308f25c..8d152f6c9450d6 100644 --- a/Lib/test/test_multiprocessing_spawn.py +++ b/Lib/test/test_multiprocessing_spawn.py @@ -3,6 +3,9 @@ from test import support +# This test spawns many processes and is slow +support.requires('cpu') + if support.PGO: raise unittest.SkipTest("test is not helpful for PGO") diff --git a/Misc/NEWS.d/next/Tests/2023-08-24-01-08-04.gh-issue-108388.fhO42m.rst b/Misc/NEWS.d/next/Tests/2023-08-24-01-08-04.gh-issue-108388.fhO42m.rst new file mode 100644 index 00000000000000..4f7b5d5ad78400 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2023-08-24-01-08-04.gh-issue-108388.fhO42m.rst @@ -0,0 +1,6 @@ +The slowest tests are now skipped by default, unless the "cpu" resource is +enabled: test_concurrent_futures, test_multiprocessing_spawn, +test_peg_generator and test_tools.test_freeze. Run the test suite with ``-u +cpu`` or ``-u all`` to run these tests. Moreover, these tests are no longer +skipped on Python built with ASAN or MSAN sanitizer. Patch by Victor +Stinner.