示例#1
0
 def test_gets_n_for_n_lower_than_cpus(self):
     assert u.get_n_jobs(3) == 3
示例#2
0
 def test_gets_all_for_zero(self):
     assert u.get_n_jobs(0) == 4
示例#3
0
 def test_gets_all_for_minus_one(self):
     assert u.get_n_jobs(-1) == 4
示例#4
0
 def test_gets_all_but_n_for_negative(self):
     assert u.get_n_jobs(-2) == 3
示例#5
0
 def test_gets_n_for_n_equal_cpus(self):
     assert u.get_n_jobs(4) == 4