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

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

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/adb_wrapper.py ('k') | build/android/pylib/device/device_errors.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/device/adb_wrapper_test.py
diff --git a/build/android/pylib/device/adb_wrapper_test.py b/build/android/pylib/device/adb_wrapper_test.py
index 208196afe553da3ed227a5d1669c2735c57039a2..6a2581c48753ad8dba43c556a8dce57dd6ebc568 100644
--- a/build/android/pylib/device/adb_wrapper_test.py
+++ b/build/android/pylib/device/adb_wrapper_test.py
@@ -37,12 +37,12 @@ class TestAdbWrapper(unittest.TestCase):
return path
def testShell(self):
- output = self._adb.Shell('echo test', expect_rc=0)
+ output = self._adb.Shell('echo test', expect_status=0)
self.assertEqual(output.strip(), 'test')
output = self._adb.Shell('echo test')
self.assertEqual(output.strip(), 'test')
- self.assertRaises(device_errors.AdbShellCommandFailedError,
- self._adb.Shell, 'echo test', expect_rc=1)
+ with self.assertRaises(device_errors.AdbCommandFailedError):
+ self._adb.Shell('echo test', expect_status=1)
def testPushPull(self):
path = self._MakeTempFile('foo')
@@ -56,16 +56,16 @@ class TestAdbWrapper(unittest.TestCase):
def testInstall(self):
path = self._MakeTempFile('foo')
- self.assertRaises(device_errors.AdbCommandFailedError, self._adb.Install,
- path)
+ with self.assertRaises(device_errors.AdbCommandFailedError):
+ self._adb.Install(path)
def testForward(self):
- self.assertRaises(device_errors.AdbCommandFailedError, self._adb.Forward,
- 0, 0)
+ with self.assertRaises(device_errors.AdbCommandFailedError):
+ self._adb.Forward(0, 0)
def testUninstall(self):
- self.assertRaises(device_errors.AdbCommandFailedError, self._adb.Uninstall,
- 'some.nonexistant.package')
+ with self.assertRaises(device_errors.AdbCommandFailedError):
+ self._adb.Uninstall('some.nonexistant.package')
def testRebootWaitForDevice(self):
self._adb.Reboot()
« no previous file with comments | « build/android/pylib/device/adb_wrapper.py ('k') | build/android/pylib/device/device_errors.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698