"""Validate that number of threads in thread pools is set to 1."""

import numexpr
import blosc
import threadpoolctl

# APIs that return previous number of threads:
assert numexpr.set_num_threads(2) == 1
assert blosc.set_nthreads(2) == 1

for d in threadpoolctl.threadpool_info():
    assert d["num_threads"] == 1, d

[((11, 9, 11, 40), 'threadpoolctl.threadpool_info', 'threadpoolctl.threadpool_info', ({}, {}), '()', False, 'import threadpoolctl\n'), ((8, 7, 8, 33), 'numexpr.set_num_threads', 'numexpr.set_num_threads', ({(8, 31, 8, 32): '(2)'}, {}), '(2)', False, 'import numexpr\n'), ((9, 7, 9, 28), 'blosc.set_nthreads', 'blosc.set_nthreads', ({(9, 26, 9, 27): '(2)'}, {}), '(2)', False, 'import blosc\n')]