Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1bc8764

Browse filesBrowse files
authored
TST: skip test if spawning threads triggers a RuntimeError (#28798)
1 parent 9ead596 commit 1bc8764
Copy full SHA for 1bc8764

File tree

Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed

‎numpy/testing/_private/utils.py

Copy file name to clipboardExpand all lines: numpy/testing/_private/utils.py
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2741,6 +2741,11 @@ def run_threaded(func, max_workers=8, pass_count=False,
27412741
futures = []
27422742
for arg in all_args:
27432743
futures.append(tpe.submit(*arg))
2744+
except RuntimeError as e:
2745+
import pytest
2746+
pytest.skip(f"Spawning {max_workers} threads failed with "
2747+
f"error {e!r} (likely due to resource limits on the "
2748+
"system running the tests)")
27442749
finally:
27452750
if len(futures) < max_workers and pass_barrier:
27462751
barrier.abort()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.