Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-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.
  • Loading branch information
vstinner committed Aug 23, 2023
commit 83becc5fa435e27cac0655ea03026fb04288a101
6 changes: 2 additions & 4 deletions Lib/test/test_concurrent_futures.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 3 additions & 0 deletions Lib/test/test_multiprocessing_spawn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
Original file line number Diff line number Diff line change
@@ -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.