Skip to content

Commit 83becc5

Browse files
committed
pythongh-108388: test_concurrent_futures requires cpu
The test_concurrent_futures and test_multiprocessing_spawn tests now require the 'cpu' resource. Skip these tests unless the 'cpu' resource is enabled (it is disabled by default). test_concurrent_futures is no longer skipped if Python is built with ASAN or MSAN sanitizer.
1 parent 7a6cc3e commit 83becc5

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

Lib/test/test_concurrent_futures.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@
3333
import multiprocessing as mp
3434

3535

36-
if support.check_sanitizer(address=True, memory=True):
37-
# gh-90791: Skip the test because it is too slow when Python is built
38-
# with ASAN/MSAN: between 5 and 20 minutes on GitHub Actions.
39-
raise unittest.SkipTest("test too slow on ASAN/MSAN build")
36+
# This test spawns many threads and processes and is slow
37+
support.requires('cpu')
4038

4139

4240
def create_future(state=PENDING, exception=None, result=None):

Lib/test/test_multiprocessing_spawn.py

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
from test import support
55

6+
# This test spawns many processes and is slow
7+
support.requires('cpu')
8+
69
if support.PGO:
710
raise unittest.SkipTest("test is not helpful for PGO")
811

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
The slowest tests are now skipped by default, unless the "cpu" resource is
2+
enabled: test_concurrent_futures, test_multiprocessing_spawn,
3+
test_peg_generator and test_tools.test_freeze. Run the test suite with ``-u
4+
cpu`` or ``-u all`` to run these tests. Moreover, these tests are no longer
5+
skipped on Python built with ASAN or MSAN sanitizer. Patch by Victor
6+
Stinner.

0 commit comments

Comments
 (0)