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

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

Issue 786123002: Update from https://crrev.com/307330 (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/device_utils.py ('k') | build/common.gypi » ('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 5f2249da740dd2379d9a4ea7de6c489a7aa62ea9..512a7d4b2fc58c6e8128e765cfc940ced8baf282 100755
--- a/build/android/pylib/device/device_utils_test.py
+++ b/build/android/pylib/device/device_utils_test.py
@@ -1093,26 +1093,22 @@ class DeviceUtilsFileExistsTest(DeviceUtilsNewImplTest):
self.assertFalse(self.device.FileExists('/does/not/exist'))
-class DeviceUtilsPullFileTest(DeviceUtilsOldImplTest):
+class DeviceUtilsPullFileTest(DeviceUtilsNewImplTest):
def testPullFile_existsOnDevice(self):
with mock.patch('os.path.exists', return_value=True):
- with self.assertCallsSequence([
- ('adb -s 0123456789abcdef shell '
- 'ls /data/app/test.file.exists',
- '/data/app/test.file.exists'),
- ('adb -s 0123456789abcdef pull '
- '/data/app/test.file.exists /test/file/host/path',
- '100 B/s (100 bytes in 1.000s)\r\n')]):
+ with self.assertCall(
+ self.call.adb.Pull('/data/app/test.file.exists',
+ '/test/file/host/path')):
self.device.PullFile('/data/app/test.file.exists',
'/test/file/host/path')
def testPullFile_doesntExistOnDevice(self):
with mock.patch('os.path.exists', return_value=True):
- with self.assertCalls(
- 'adb -s 0123456789abcdef shell '
- 'ls /data/app/test.file.does.not.exist',
- '/data/app/test.file.does.not.exist: No such file or directory\r\n'):
+ with self.assertCall(
+ self.call.adb.Pull('/data/app/test.file.does.not.exist',
+ '/test/file/host/path'),
+ self.CommandError('remote object does not exist')):
with self.assertRaises(device_errors.CommandFailedError):
self.device.PullFile('/data/app/test.file.does.not.exist',
'/test/file/host/path')
« no previous file with comments | « build/android/pylib/device/device_utils.py ('k') | build/common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698