def test_add_less_gpu(self): node_id = 2 gpu_count = 3 GPUManager.define_node_gpus(node_id, gpu_count) self.assertEqual(GPUManager.get_gpu_count_for_node(node_id), 3) gpu_count = 1 GPUManager.define_node_gpus(node_id, gpu_count) self.assertEqual(GPUManager.get_gpu_count_for_node(node_id), 3)
def test_add_additional_GPU(self): node_id = 3 gpu_count = 4 GPUManager.define_node_gpus(node_id, gpu_count) self.assertEqual(GPUManager.get_gpu_count_for_node(node_id), 4)
def test_add_new_node_gpus(self): node_id = 1 gpu_count = 3 GPUManager.define_node_gpus(node_id, gpu_count) self.assertEqual(GPUManager.get_gpu_count_for_node(node_id), gpu_count)