def test_set_beyond_max(self): chemfp.set_num_threads(chemfp.get_max_threads()+1) self.assertEquals(chemfp.get_num_threads(), chemfp.get_max_threads())
def test_set_to_one(self): chemfp.set_num_threads(1) self.assertEquals(chemfp.get_num_threads(), 1)
def test_set_to_two(self): chemfp.set_num_threads(2) self.assertEquals(chemfp.get_num_threads(), 2)
def test_num_threads_is_max_threads(self): self.assertEquals(chemfp.get_num_threads(), chemfp.get_max_threads())
def test_set_to_zero(self): chemfp.set_num_threads(0) self.assertEquals(chemfp.get_num_threads(), 1)
def test_set_beyond_max(self): chemfp.set_num_threads(chemfp.get_max_threads() + 1) self.assertEquals(chemfp.get_num_threads(), chemfp.get_max_threads())
def setUp(self): self._num_threads = chemfp.get_num_threads()