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

Side by Side Diff: build/android/pylib/gtest/test_package_test.py

Issue 441783002: [Android] Update gtest test list parsing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add chromium copyright header to test_package_test.py. Created 6 years, 4 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
OLDNEW
(Empty)
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import unittest
6
7 from pylib.gtest import test_package
8
9
10 class TestPackageTest(unittest.TestCase):
11
12 def testParseGTestListTests_simple(self):
13 raw_output = [
14 'TestCaseOne.',
15 ' testOne',
16 ' testTwo',
17 'TestCaseTwo.',
18 ' testThree',
19 ' testFour',
20 ]
21 actual = test_package.TestPackage._ParseGTestListTests(raw_output)
22 expected = [
23 'TestCaseOne.testOne',
24 'TestCaseOne.testTwo',
25 'TestCaseTwo.testThree',
26 'TestCaseTwo.testFour',
27 ]
28 self.assertEqual(expected, actual)
29
30 def testParseGTestListTests_parameterized_old(self):
31 raw_output = [
32 'PTestCase.',
33 ' testWithValueParam/0',
34 ' testWithValueParam/1',
35 ]
36 actual = test_package.TestPackage._ParseGTestListTests(raw_output)
37 expected = [
38 'PTestCase.testWithValueParam/0',
39 'PTestCase.testWithValueParam/1',
40 ]
41 self.assertEqual(expected, actual)
42
43 def testParseGTestListTests_parameterized_new(self):
44 raw_output = [
45 'PTestCase.',
46 ' testWithValueParam/0 # GetParam() = 0',
47 ' testWithValueParam/1 # GetParam() = 1',
48 ]
49 actual = test_package.TestPackage._ParseGTestListTests(raw_output)
50 expected = [
51 'PTestCase.testWithValueParam/0',
52 'PTestCase.testWithValueParam/1',
53 ]
54 self.assertEqual(expected, actual)
55
56
57 if __name__ == '__main__':
58 unittest.main(verbosity=2)
59
OLDNEW
« build/android/pylib/gtest/test_package.py ('K') | « build/android/pylib/gtest/test_package.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698