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

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

Issue 1116493003: Revert of [Android] Remove more uses of android_commands from build/android/pylib. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/perf/perf_control_unittest.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 e395c8f33d36081a9b1c20a7182fa73a159ea4ca..4301e9d9a5efe497fd12ce4e3bb1e5af6e34bf4c 100755
--- a/build/android/pylib/device/device_utils_test.py
+++ b/build/android/pylib/device/device_utils_test.py
@@ -159,73 +159,6 @@
msg = 'Command failed'
return mock.Mock(side_effect=device_errors.CommandFailedError(
msg, str(self.device)))
-
-
-class DeviceUtilsEqTest(DeviceUtilsTest):
-
- def testEq_equal_deviceUtils(self):
- other = device_utils.DeviceUtils(_AdbWrapperMock('0123456789abcdef'))
- self.assertTrue(self.device == other)
- self.assertTrue(other == self.device)
-
- def testEq_equal_adbWrapper(self):
- other = adb_wrapper.AdbWrapper('0123456789abcdef')
- self.assertTrue(self.device == other)
- self.assertTrue(other == self.device)
-
- def testEq_equal_string(self):
- other = '0123456789abcdef'
- self.assertTrue(self.device == other)
- self.assertTrue(other == self.device)
-
- def testEq_devicesNotEqual(self):
- other = device_utils.DeviceUtils(_AdbWrapperMock('0123456789abcdee'))
- self.assertFalse(self.device == other)
- self.assertFalse(other == self.device)
-
- def testEq_identity(self):
- self.assertTrue(self.device == self.device)
-
- def testEq_serialInList(self):
- devices = [self.device]
- self.assertTrue('0123456789abcdef' in devices)
-
-
-class DeviceUtilsLtTest(DeviceUtilsTest):
-
- def testLt_lessThan(self):
- other = device_utils.DeviceUtils(_AdbWrapperMock('ffffffffffffffff'))
- self.assertTrue(self.device < other)
- self.assertTrue(other > self.device)
-
- def testLt_greaterThan_lhs(self):
- other = device_utils.DeviceUtils(_AdbWrapperMock('0000000000000000'))
- self.assertFalse(self.device < other)
- self.assertFalse(other > self.device)
-
- def testLt_equal(self):
- other = device_utils.DeviceUtils(_AdbWrapperMock('0123456789abcdef'))
- self.assertFalse(self.device < other)
- self.assertFalse(other > self.device)
-
- def testLt_sorted(self):
- devices = [
- device_utils.DeviceUtils(_AdbWrapperMock('ffffffffffffffff')),
- device_utils.DeviceUtils(_AdbWrapperMock('0000000000000000')),
- ]
- sorted_devices = sorted(devices)
- self.assertEquals('0000000000000000',
- sorted_devices[0].adb.GetDeviceSerial())
- self.assertEquals('ffffffffffffffff',
- sorted_devices[1].adb.GetDeviceSerial())
-
-
-class DeviceUtilsStrTest(DeviceUtilsTest):
-
- def testStr_returnsSerial(self):
- with self.assertCalls(
- (self.call.adb.GetDeviceSerial(), '0123456789abcdef')):
- self.assertEqual('0123456789abcdef', str(self.device))
class DeviceUtilsIsOnlineTest(DeviceUtilsTest):
@@ -1606,6 +1539,14 @@
self.device.GetMemoryUsageForPid(4321))
+class DeviceUtilsStrTest(DeviceUtilsTest):
+
+ def testStr_returnsSerial(self):
+ with self.assertCalls(
+ (self.call.adb.GetDeviceSerial(), '0123456789abcdef')):
+ self.assertEqual('0123456789abcdef', str(self.device))
+
+
class DeviceUtilsClientCache(DeviceUtilsTest):
def testClientCache_twoCaches(self):
« no previous file with comments | « build/android/pylib/device/device_utils.py ('k') | build/android/pylib/perf/perf_control_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698