Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Unified Diff: build/android/devil/android/tools/script_common_test.py

Issue 1770943003: [Android] Remove chromium version of devil. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: build/android/devil/android/tools/script_common_test.py
diff --git a/build/android/devil/android/tools/script_common_test.py b/build/android/devil/android/tools/script_common_test.py
deleted file mode 100755
index bb5e29efcf0e2adca90d8ff41002088648467b83..0000000000000000000000000000000000000000
--- a/build/android/devil/android/tools/script_common_test.py
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-
-import sys
-import unittest
-
-from devil import devil_env
-from devil.android import device_errors
-from devil.android import device_utils
-from devil.android.tools import script_common
-
-with devil_env.SysPath(devil_env.PYMOCK_PATH):
- import mock # pylint: disable=import-error
-
-
-class ScriptCommonTest(unittest.TestCase):
-
- def testGetDevices_noSpecs(self):
- devices = [
- device_utils.DeviceUtils('123'),
- device_utils.DeviceUtils('456'),
- ]
- with mock.patch('devil.android.device_utils.DeviceUtils.HealthyDevices',
- return_value=devices):
- self.assertEquals(
- devices,
- script_common.GetDevices(None, None))
-
- def testGetDevices_withDevices(self):
- devices = [
- device_utils.DeviceUtils('123'),
- device_utils.DeviceUtils('456'),
- ]
- with mock.patch('devil.android.device_utils.DeviceUtils.HealthyDevices',
- return_value=devices):
- self.assertEquals(
- [device_utils.DeviceUtils('456')],
- script_common.GetDevices(['456'], None))
-
- def testGetDevices_missingDevice(self):
- with mock.patch('devil.android.device_utils.DeviceUtils.HealthyDevices',
- return_value=[device_utils.DeviceUtils('123')]):
- with self.assertRaises(device_errors.DeviceUnreachableError):
- script_common.GetDevices(['456'], None)
-
- def testGetDevices_noDevices(self):
- with mock.patch('devil.android.device_utils.DeviceUtils.HealthyDevices',
- return_value=[]):
- with self.assertRaises(device_errors.NoDevicesError):
- script_common.GetDevices(None, None)
-
-
-if __name__ == '__main__':
- sys.exit(unittest.main())
-
« no previous file with comments | « build/android/devil/android/tools/script_common.py ('k') | build/android/devil/android/tools/video_recorder.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698