diff options
Diffstat (limited to 'catapult/devil/devil/android/device_errors_test.py')
-rwxr-xr-x | catapult/devil/devil/android/device_errors_test.py | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/catapult/devil/devil/android/device_errors_test.py b/catapult/devil/devil/android/device_errors_test.py index 68a4f167..5fc9e254 100755 --- a/catapult/devil/devil/android/device_errors_test.py +++ b/catapult/devil/devil/android/device_errors_test.py @@ -11,7 +11,6 @@ from devil.android import device_errors class DeviceErrorsTest(unittest.TestCase): - def assertIsPicklable(self, original): pickled = pickle.dumps(original) reconstructed = pickle.loads(pickled) @@ -19,7 +18,9 @@ class DeviceErrorsTest(unittest.TestCase): def testPicklable_AdbCommandFailedError(self): original = device_errors.AdbCommandFailedError( - ['these', 'are', 'adb', 'args'], 'adb failure output', status=':(', + ['these', 'are', 'adb', 'args'], + 'adb failure output', + status=':(', device_serial='0123456789abcdef') self.assertIsPicklable(original) @@ -29,18 +30,15 @@ class DeviceErrorsTest(unittest.TestCase): self.assertIsPicklable(original) def testPicklable_CommandFailedError(self): - original = device_errors.CommandFailedError( - 'sample command failed') + original = device_errors.CommandFailedError('sample command failed') self.assertIsPicklable(original) def testPicklable_CommandTimeoutError(self): - original = device_errors.CommandTimeoutError( - 'My fake command timed out :(') + original = device_errors.CommandTimeoutError('My fake command timed out :(') self.assertIsPicklable(original) def testPicklable_DeviceChargingError(self): - original = device_errors.DeviceChargingError( - 'Fake device failed to charge') + original = device_errors.DeviceChargingError('Fake device failed to charge') self.assertIsPicklable(original) def testPicklable_DeviceUnreachableError(self): @@ -49,8 +47,10 @@ class DeviceErrorsTest(unittest.TestCase): def testPicklable_FastbootCommandFailedError(self): original = device_errors.FastbootCommandFailedError( - ['these', 'are', 'fastboot', 'args'], 'fastboot failure output', - status=':(', device_serial='0123456789abcdef') + ['these', 'are', 'fastboot', 'args'], + 'fastboot failure output', + status=':(', + device_serial='0123456789abcdef') self.assertIsPicklable(original) def testPicklable_MultipleDevicesError(self): @@ -67,6 +67,5 @@ class DeviceErrorsTest(unittest.TestCase): self.assertIsPicklable(original) - if __name__ == '__main__': sys.exit(unittest.main()) |