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

Unified Diff: build/android/pylib/instrumentation/test_runner_test.py

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/instrumentation/test_runner.py ('k') | build/android/pylib/linker/test_case.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/instrumentation/test_runner_test.py
diff --git a/build/android/pylib/instrumentation/test_runner_test.py b/build/android/pylib/instrumentation/test_runner_test.py
index 039bb031ad63e0dcf76bafad32e7bcc40389f44a..0f2845ea5bfab4f1ac9972efbc75b0c011776349 100755
--- a/build/android/pylib/instrumentation/test_runner_test.py
+++ b/build/android/pylib/instrumentation/test_runner_test.py
@@ -144,7 +144,7 @@ class InstrumentationTestRunnerTest(unittest.TestCase):
self.assertEqual('test.package.TestClass#testMethod', result.GetName())
self.assertEqual(base_test_result.ResultType.UNKNOWN, result.GetType())
self.assertEqual('', result.GetLog())
- self.assertEqual(1000, result.GetDur())
+ self.assertEqual(1000, result.GetDuration())
def testGenerateTestResult_testPassed(self):
statuses = [
@@ -253,17 +253,18 @@ class InstrumentationTestRunnerTest(unittest.TestCase):
def test_RunTest_verifyAdbShellCommand(self):
self.instance.options.test_runner = 'MyTestRunner'
- self.instance.device.RunShellCommand = mock.Mock()
+ self.instance.device.StartInstrumentation = mock.Mock()
self.instance.test_pkg.GetPackageName = mock.Mock(
return_value='test.package')
self.instance._GetInstrumentationArgs = mock.Mock(
return_value={'test_arg_key': 'test_arg_value'})
self.instance._RunTest('test.package.TestClass#testMethod', 100)
- self.instance.device.RunShellCommand.assert_called_with(
- ['am', 'instrument', '-r',
- '-e', 'test_arg_key', 'test_arg_value',
- '-e', 'class', 'test.package.TestClass#testMethod',
- '-w', 'test.package/MyTestRunner'],
+ self.instance.device.StartInstrumentation.assert_called_with(
+ 'test.package/MyTestRunner', raw=True,
+ extras={
+ 'test_arg_key': 'test_arg_value',
+ 'class': 'test.package.TestClass#testMethod'
+ },
timeout=100, retries=0)
if __name__ == '__main__':
« no previous file with comments | « build/android/pylib/instrumentation/test_runner.py ('k') | build/android/pylib/linker/test_case.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698