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

Side by Side Diff: build/android/pylib/instrumentation/test_runner_test.py

Issue 670463002: Revert of New run shell implementation for DeviceUtils (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « build/android/pylib/instrumentation/test_runner.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 6
7 """Unit tests for instrumentation.TestRunner.""" 7 """Unit tests for instrumentation.TestRunner."""
8 8
9 # pylint: disable=W0212 9 # pylint: disable=W0212
10 10
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 def test_RunTest_verifyAdbShellCommand(self): 254 def test_RunTest_verifyAdbShellCommand(self):
255 self.instance.options.test_runner = 'MyTestRunner' 255 self.instance.options.test_runner = 'MyTestRunner'
256 self.instance.device.RunShellCommand = mock.Mock() 256 self.instance.device.RunShellCommand = mock.Mock()
257 self.instance.test_pkg.GetPackageName = mock.Mock( 257 self.instance.test_pkg.GetPackageName = mock.Mock(
258 return_value='test.package') 258 return_value='test.package')
259 self.instance._GetInstrumentationArgs = mock.Mock( 259 self.instance._GetInstrumentationArgs = mock.Mock(
260 return_value={'test_arg_key': 'test_arg_value'}) 260 return_value={'test_arg_key': 'test_arg_value'})
261 self.instance._RunTest('test.package.TestClass#testMethod', 100) 261 self.instance._RunTest('test.package.TestClass#testMethod', 100)
262 self.instance.device.RunShellCommand.assert_called_with( 262 self.instance.device.RunShellCommand.assert_called_with(
263 ['am', 'instrument', '-r', 263 ['am', 'instrument', '-r',
264 '-e', 'test_arg_key', 'test_arg_value', 264 '-e', 'test_arg_key', "'test_arg_value'",
265 '-e', 'class', 'test.package.TestClass#testMethod', 265 '-e', 'class', "'test.package.TestClass#testMethod'",
266 '-w', 'test.package/MyTestRunner'], 266 '-w', 'test.package/MyTestRunner'],
267 timeout=100, retries=0) 267 timeout=100, retries=0)
268 268
269 if __name__ == '__main__': 269 if __name__ == '__main__':
270 unittest.main(verbosity=2) 270 unittest.main(verbosity=2)
271 271
OLDNEW
« no previous file with comments | « build/android/pylib/instrumentation/test_runner.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698