File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
Original file line number Diff line number Diff line change 5
5
import numpy as np
6
6
import pytest
7
7
8
- from numpy .testing import IS_WASM
8
+ from numpy .testing import IS_WASM , IS_64BIT
9
9
from numpy .testing ._private .utils import run_threaded
10
10
from numpy ._core import _rational_tests
11
11
@@ -257,20 +257,16 @@ def func(arr):
257
257
f .result ()
258
258
259
259
260
+ @pytest .mark .skipif (
261
+ not IS_64BIT ,
262
+ reason = "Sometimes causes failures or crashes due to OOM on 32 bit runners"
263
+ )
260
264
def test_legacy_usertype_cast_init_thread_safety ():
261
265
def closure (b ):
262
266
b .wait ()
263
267
np .full ((10 , 10 ), 1 , _rational_tests .rational )
264
268
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 )
274
270
275
271
@pytest .mark .parametrize ("dtype" , [bool , int , float ])
276
272
def test_nonzero (dtype ):
You can’t perform that action at this time.
0 commit comments