--- MDAnalysisTests/transformations/test_base.py.orig 2022-06-02 18:49:13 UTC +++ MDAnalysisTests/transformations/test_base.py @@ -23,7 +23,8 @@ from numpy.testing import assert_equal import numpy as np import pytest from numpy.testing import assert_equal -from threadpoolctl import threadpool_info +# threadpoolctl is not yet usable on FreeBSD +#from threadpoolctl import threadpool_info import MDAnalysis as mda from MDAnalysisTests.datafiles import PSF, DCD @@ -36,7 +37,7 @@ class DefaultTransformation(TransformationBase): super().__init__() def _transform(self, ts): - self.runtime_info = threadpool_info() + """self.runtime_info = threadpool_info()""" ts.positions = ts.positions + 1 return ts @@ -54,7 +55,7 @@ class CustomTransformation(TransformationBase): parallelizable=parallelizable) def _transform(self, ts): - self.runtime_info = threadpool_info() + """self.runtime_info = threadpool_info()""" ts.positions = ts.positions + 1 return ts @@ -88,17 +89,17 @@ def test_thread_limit_apply(u): def test_thread_limit_apply(u): - default_thread_info = threadpool_info() + """default_thread_info = threadpool_info() default_num_thread_limit_list = [thread_info['num_threads'] for thread_info in default_thread_info] new_trans = CustomTransformation(max_threads=2) _ = new_trans(u.trajectory.ts) - for thread_info in new_trans.runtime_info: - assert thread_info['num_threads'] == 2 + for thread_info in new_trans.runtime_info:""" + assert thread_info['num_threads'] == 2 # test the thread limit is only applied locally. - new_thread_info = threadpool_info() + """new_thread_info = threadpool_info() new_num_thread_limit_list = [thread_info['num_threads'] - for thread_info in new_thread_info] - assert_equal(default_num_thread_limit_list, new_num_thread_limit_list) + for thread_info in new_thread_info]""" + assert_equal(default_num_thread_limit_list, 2)