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