コード例 #1
0
 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'])
コード例 #2
0
 def testNoGpu(self):
     self.assertDeviceIdCorrectness(
         magic_substitutions.GPUExpectedDeviceId(
             {'swarming': {
                 'dimension_sets': [{}]
             }}), ['0'])
コード例 #3
0
 def testNoDimensions(self):
     with self.assertRaises(AssertionError):
         magic_substitutions.GPUExpectedDeviceId({})