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

Unified Diff: build/android/pylib/device/device_utils_test.py

Issue 1288993002: Revert of [Android] Remove android_commands and android_testrunner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « build/android/pylib/device/device_utils.py ('k') | build/android/pylib/gtest/test_package_apk.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/device/device_utils_test.py
diff --git a/build/android/pylib/device/device_utils_test.py b/build/android/pylib/device/device_utils_test.py
index 580794ddb8c3aca0416ea622c590ebb3c7b4e9a9..1d5f9efed8fc619667ee1aefa8b153f05fb4c250 100755
--- a/build/android/pylib/device/device_utils_test.py
+++ b/build/android/pylib/device/device_utils_test.py
@@ -19,6 +19,7 @@
import sys
import unittest
+from pylib import android_commands
from pylib import cmd_helper
from pylib import constants
from pylib import device_signal
@@ -29,6 +30,11 @@
from pylib.sdk import split_select
from pylib.utils import mock_calls
+# RunCommand from third_party/android_testrunner/run_command.py is mocked
+# below, so its path needs to be in sys.path.
+sys.path.append(os.path.join(
+ constants.DIR_SOURCE_ROOT, 'third_party', 'android_testrunner'))
+
sys.path.append(os.path.join(
constants.DIR_SOURCE_ROOT, 'third_party', 'pymock'))
import mock # pylint: disable=F0401
@@ -49,6 +55,12 @@
def testInitWithAdbWrapper(self):
serial = '123456789abcdef0'
a = adb_wrapper.AdbWrapper(serial)
+ d = device_utils.DeviceUtils(a)
+ self.assertEqual(serial, d.adb.GetDeviceSerial())
+
+ def testInitWithAndroidCommands(self):
+ serial = '0fedcba987654321'
+ a = android_commands.AndroidCommands(device=serial)
d = device_utils.DeviceUtils(a)
self.assertEqual(serial, d.adb.GetDeviceSerial())
« no previous file with comments | « build/android/pylib/device/device_utils.py ('k') | build/android/pylib/gtest/test_package_apk.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698