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

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

Issue 2268193002: Add new Android JUnit Instrumentation Skip code to python script (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Delete empty Created 4 years, 3 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/instrumentation_test_instance.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 """Unit tests for instrumentation_test_instance.""" 6 """Unit tests for instrumentation_test_instance."""
7 7
8 # pylint: disable=protected-access 8 # pylint: disable=protected-access
9 9
10 import unittest 10 import unittest
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 'test': 'testMethod', 592 'test': 'testMethod',
593 'stack': stacktrace, 593 'stack': stacktrace,
594 }), 594 }),
595 ] 595 ]
596 results = instrumentation_test_instance.GenerateTestResults( 596 results = instrumentation_test_instance.GenerateTestResults(
597 None, None, statuses, 0, 1000) 597 None, None, statuses, 0, 1000)
598 self.assertEqual(1, len(results)) 598 self.assertEqual(1, len(results))
599 self.assertEqual(base_test_result.ResultType.FAIL, results[0].GetType()) 599 self.assertEqual(base_test_result.ResultType.FAIL, results[0].GetType())
600 self.assertEqual(stacktrace, results[0].GetLog()) 600 self.assertEqual(stacktrace, results[0].GetLog())
601 601
602 def testGenerateJUnitTestResults_testSkipped_true(self):
603 statuses = [
604 (1, {
605 'class': 'test.package.TestClass',
606 'test': 'testMethod',
607 }),
608 (-3, {
609 'class': 'test.package.TestClass',
610 'test': 'testMethod',
611 }),
612 ]
613 results = instrumentation_test_instance.GenerateTestResults(
614 None, None, statuses, 0, 1000)
615 self.assertEqual(1, len(results))
616 self.assertEqual(base_test_result.ResultType.SKIP, results[0].GetType())
617
602 618
603 if __name__ == '__main__': 619 if __name__ == '__main__':
604 unittest.main(verbosity=2) 620 unittest.main(verbosity=2)
OLDNEW
« no previous file with comments | « build/android/pylib/instrumentation/instrumentation_test_instance.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698