Skip to content

Commit 35834f6

Browse files
committed
tmp changes
1 parent c8154d2 commit 35834f6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

mkl_fft/tests/third_party/scipy/test_multithreading.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import multiprocessing
55
import os
66

7+
import mkl
78
import numpy as np
89
import pytest
910
from numpy.testing import assert_allclose
@@ -81,9 +82,10 @@ def test_invalid_workers(x):
8182

8283
def test_set_get_workers():
8384
cpus = os.cpu_count()
85+
threads = mkl.get_max_threads()
8486

8587
# default value is max number of threads unlike stock SciPy
86-
assert fft.get_workers() == cpus
88+
# assert fft.get_workers() == cpus
8789
with fft.set_workers(4):
8890
assert fft.get_workers() == 4
8991

@@ -93,11 +95,13 @@ def test_set_get_workers():
9395
assert fft.get_workers() == 4
9496

9597
# default value is max number of threads unlike stock SciPy
96-
assert fft.get_workers() == cpus
98+
# assert fft.get_workers() == cpus
9799

98100
with fft.set_workers(-cpus):
99101
assert fft.get_workers() == 1
100102

103+
assert threads == cpus
104+
101105

102106
def test_set_workers_invalid():
103107

0 commit comments

Comments
 (0)