OLD | NEW |
---|---|
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """Base class representing GTest test packages.""" | 5 """Base class representing GTest test packages.""" |
6 # pylint: disable=R0201 | 6 # pylint: disable=R0201 |
7 | 7 |
8 | 8 |
9 class TestPackage(object): | 9 class TestPackage(object): |
10 | 10 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
81 A list of all tests. For the above raw listing: | 81 A list of all tests. For the above raw listing: |
82 | 82 |
83 [IPCChannelTest.SendMessageInChannelConnected, IPCSyncChannelTest.Simple, | 83 [IPCChannelTest.SendMessageInChannelConnected, IPCSyncChannelTest.Simple, |
84 IPCSyncChannelTest.DISABLED_SendWithTimeoutMixedOKAndTimeout] | 84 IPCSyncChannelTest.DISABLED_SendWithTimeoutMixedOKAndTimeout] |
85 """ | 85 """ |
86 ret = [] | 86 ret = [] |
87 current = '' | 87 current = '' |
88 for test in raw_list: | 88 for test in raw_list: |
89 if not test: | 89 if not test: |
90 continue | 90 continue |
91 if test[0] != ' ' and not test.endswith('.'): | 91 if test[0] != ' ': |
92 # Ignore any lines with unexpected format. | 92 test_case = test.split(None, 1)[0] |
craigdh
2014/08/05 20:59:31
how is this different from test.split()[0]?
jbudorick
2014/08/05 21:04:10
As before, functionally the same, but it only does
craigdh
2014/08/05 21:23:33
Ah, I never saw your response to the other one. I
| |
93 continue | 93 if test_case.endswith('.'): |
94 if test[0] != ' ' and test.endswith('.'): | 94 current = test_case |
95 current = test | |
96 continue | 95 continue |
craigdh
2014/08/05 20:59:31
use an else instead
jbudorick
2014/08/05 21:04:10
Done.
| |
97 if 'YOU HAVE' in test: | 96 if 'YOU HAVE' in test: |
98 break | 97 break |
99 test_name = test.split(None, 1)[0] | 98 test_name = test.split(None, 1)[0] |
100 ret += [current + test_name] | 99 ret += [current + test_name] |
101 return ret | 100 return ret |
OLD | NEW |