File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
mkl_fft/tests/third_party/scipy Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 4
4
import multiprocessing
5
5
import os
6
6
7
+ import mkl
7
8
import numpy as np
8
9
import pytest
9
10
from numpy .testing import assert_allclose
@@ -81,9 +82,10 @@ def test_invalid_workers(x):
81
82
82
83
def test_set_get_workers ():
83
84
cpus = os .cpu_count ()
85
+ threads = mkl .get_max_threads ()
84
86
85
87
# default value is max number of threads unlike stock SciPy
86
- assert fft .get_workers () == cpus
88
+ # assert fft.get_workers() == cpus
87
89
with fft .set_workers (4 ):
88
90
assert fft .get_workers () == 4
89
91
@@ -93,11 +95,13 @@ def test_set_get_workers():
93
95
assert fft .get_workers () == 4
94
96
95
97
# default value is max number of threads unlike stock SciPy
96
- assert fft .get_workers () == cpus
98
+ # assert fft.get_workers() == cpus
97
99
98
100
with fft .set_workers (- cpus ):
99
101
assert fft .get_workers () == 1
100
102
103
+ assert threads == cpus
104
+
101
105
102
106
def test_set_workers_invalid ():
103
107
You can’t perform that action at this time.
0 commit comments