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 3b6288c

Browse filesBrowse files
ngoldbaumcharris
authored andcommitted
BUG: skip legacy dtype multithreaded test on 32 bit runners
[wheel build]
1 parent 975443d commit 3b6288c
Copy full SHA for 3b6288c

File tree

Expand file treeCollapse file tree

1 file changed

+6
-10
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-10
lines changed

‎numpy/_core/tests/test_multithreading.py

Copy file name to clipboardExpand all lines: numpy/_core/tests/test_multithreading.py
+6-10Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import numpy as np
66
import pytest
77

8-
from numpy.testing import IS_WASM
8+
from numpy.testing import IS_WASM, IS_64BIT
99
from numpy.testing._private.utils import run_threaded
1010
from numpy._core import _rational_tests
1111

@@ -257,20 +257,16 @@ def func(arr):
257257
f.result()
258258

259259

260+
@pytest.mark.skipif(
261+
not IS_64BIT,
262+
reason="Sometimes causes failures or crashes due to OOM on 32 bit runners"
263+
)
260264
def test_legacy_usertype_cast_init_thread_safety():
261265
def closure(b):
262266
b.wait()
263267
np.full((10, 10), 1, _rational_tests.rational)
264268

265-
try:
266-
run_threaded(closure, 250, pass_barrier=True)
267-
except RuntimeError:
268-
# The 32 bit linux runner will trigger this with 250 threads. I can
269-
# trigger it on my Linux laptop with 500 threads but the CI runner is
270-
# more resource-constrained.
271-
# Reducing the number of threads means the test doesn't trigger the
272-
# bug. Better to skip on some platforms than add a useless test.
273-
pytest.skip("Couldn't spawn enough threads to run the test")
269+
run_threaded(closure, 250, pass_barrier=True)
274270

275271
@pytest.mark.parametrize("dtype", [bool, int, float])
276272
def test_nonzero(dtype):

0 commit comments

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