def test_allocate_slave_increments_by_per_slave_when_max_not_inf_and_less_than_num(self): build = Build(BuildRequest({})) build._max_executors_per_slave = 5 slave = Mock() slave.num_executors = 10 build.allocate_slave(slave) self.assertEqual(build._num_executors_allocated, 5, "Should be incremented by num executors")
def test_allocate_slave_increments_by_per_slave_when_max_not_inf_and_less_than_num( self): build = Build(BuildRequest({})) build._max_executors_per_slave = 5 slave = Mock() slave.num_executors = 10 build.allocate_slave(slave) self.assertEqual(build._num_executors_allocated, 5, "Should be incremented by num executors")