def testDoubleGpuDoubleDimension(self): test_config = CreateConfigWithGpus([ 'vendor:device1-driver|vendor:device2-driver', 'vendor:device1-driver|vendor:device3-driver' ]) self.assertDeviceIdCorrectness( magic_substitutions.GPUExpectedDeviceId(test_config), ['device1', 'device2', 'device3'])
def testNoGpu(self): self.assertDeviceIdCorrectness( magic_substitutions.GPUExpectedDeviceId( {'swarming': { 'dimension_sets': [{}] }}), ['0'])
def testNoDimensions(self): with self.assertRaises(AssertionError): magic_substitutions.GPUExpectedDeviceId({})