| Index: tools/telemetry/telemetry/core/gpu_device_unittest.py
|
| diff --git a/tools/telemetry/telemetry/core/gpu_device_unittest.py b/tools/telemetry/telemetry/core/gpu_device_unittest.py
|
| index 3ccf516c072965e754b48ba1a5fe39d39f154ae6..1e6415a88d46280a43e23ccce886c70dc87cdd90 100644
|
| --- a/tools/telemetry/telemetry/core/gpu_device_unittest.py
|
| +++ b/tools/telemetry/telemetry/core/gpu_device_unittest.py
|
| @@ -7,6 +7,7 @@ from telemetry.core import gpu_device
|
|
|
|
|
| class TestGPUDevice(unittest.TestCase):
|
| +
|
| def testConstruction(self):
|
| device = gpu_device.GPUDevice(1000, 2000, 'test_vendor', 'test_device')
|
| self.assertEquals(device.vendor_id, 1000)
|
| @@ -15,10 +16,10 @@ class TestGPUDevice(unittest.TestCase):
|
| self.assertEquals(device.device_string, 'test_device')
|
|
|
| def testFromDict(self):
|
| - dictionary = { 'vendor_id': 3000,
|
| - 'device_id': 4000,
|
| - 'vendor_string': 'test_vendor_2',
|
| - 'device_string': 'test_device_2' }
|
| + dictionary = {'vendor_id': 3000,
|
| + 'device_id': 4000,
|
| + 'vendor_string': 'test_vendor_2',
|
| + 'device_string': 'test_device_2'}
|
| device = gpu_device.GPUDevice.FromDict(dictionary)
|
| self.assertEquals(device.vendor_id, 3000)
|
| self.assertEquals(device.device_id, 4000)
|
| @@ -27,10 +28,10 @@ class TestGPUDevice(unittest.TestCase):
|
|
|
| def testMissingAttrsFromDict(self):
|
| data = {
|
| - 'vendor_id': 1,
|
| - 'device_id': 2,
|
| - 'vendor_string': 'a',
|
| - 'device_string': 'b'
|
| + 'vendor_id': 1,
|
| + 'device_id': 2,
|
| + 'vendor_string': 'a',
|
| + 'device_string': 'b'
|
| }
|
|
|
| for k in data:
|
| @@ -41,5 +42,5 @@ class TestGPUDevice(unittest.TestCase):
|
| self.fail('Should raise exception if attribute "%s" is missing' % k)
|
| except AssertionError:
|
| raise
|
| - except:
|
| + except KeyError:
|
| pass
|
|
|