Chromium Code Reviews| Index: build/android/pylib/instrumentation/instrumentation_test_instance_test.py |
| diff --git a/build/android/pylib/instrumentation/instrumentation_test_instance_test.py b/build/android/pylib/instrumentation/instrumentation_test_instance_test.py |
| index 666e89239897dadfba8156fe4ee80925f1062192..f74b6e13888bd98072dfd72177f5bcdb279c60c1 100755 |
| --- a/build/android/pylib/instrumentation/instrumentation_test_instance_test.py |
| +++ b/build/android/pylib/instrumentation/instrumentation_test_instance_test.py |
| @@ -7,8 +7,12 @@ |
| # pylint: disable=protected-access |
| +import os |
| +import sys |
| import unittest |
| +sys.path.append(os.path.abspath( |
| + os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))) |
|
jbudorick
2016/08/24 20:33:07
nit: You shouldn't need to add this.
the real yoland
2016/08/26 19:53:12
Done
|
| from pylib.base import base_test_result |
| from pylib.constants import host_paths |
| from pylib.instrumentation import instrumentation_test_instance |
| @@ -599,6 +603,23 @@ class InstrumentationTestInstanceTest(unittest.TestCase): |
| self.assertEqual(base_test_result.ResultType.FAIL, results[0].GetType()) |
| self.assertEqual(stacktrace, results[0].GetLog()) |
| + def testGenerateJUnitTestResults_testSkipped_true(self): |
| + statuses = [ |
| + (1, { |
| + 'class': 'test.package.TestClass', |
| + 'test': 'testMethod', |
| + }), |
| + (-3, { |
| + 'class': 'test.package.TestClass', |
| + 'test': 'testMethod', |
| + }), |
| + ] |
| + results = instrumentation_test_instance.GenerateTestResults( |
| + None, None, statuses, 0, 1000) |
| + self.assertEqual(1, len(results)) |
| + self.assertEqual(base_test_result.ResultType.SKIP, results[0].GetType()) |
| + |
| + |
| if __name__ == '__main__': |
| unittest.main(verbosity=2) |