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/gtest/gtest_test_instance_test.py

Issue 2555633002: [Android] Support gtest_filter + gtest_also_run_disabled_tests (Closed)
Patch Set: Replace 'DISABLED_' in same way Created 4 years 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/gtest/gtest_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 import unittest 6 import unittest
7 7
8 from pylib.base import base_test_result 8 from pylib.base import base_test_result
9 from pylib.gtest import gtest_test_instance 9 from pylib.gtest import gtest_test_instance
10 10
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 'positive1', 203 'positive1',
204 'positive2', 204 'positive2',
205 '-negative1', 205 '-negative1',
206 '-negative2' 206 '-negative2'
207 ] 207 ]
208 actual = gtest_test_instance \ 208 actual = gtest_test_instance \
209 .ConvertTestFilterFileIntoGTestFilterArgument(input_lines) 209 .ConvertTestFilterFileIntoGTestFilterArgument(input_lines)
210 expected = 'positive1:positive2-negative1:negative2' 210 expected = 'positive1:positive2-negative1:negative2'
211 self.assertEquals(expected, actual) 211 self.assertEquals(expected, actual)
212 212
213 def testTestNameWithoutDisabledPrefix_disabled(self):
214 test_name_list = [
215 'A.DISABLED_B',
216 'DISABLED_A.B',
217 'DISABLED_A.DISABLED_B',
218 ]
219 for test_name in test_name_list:
220 actual = gtest_test_instance \
221 .TestNameWithoutDisabledPrefix(test_name)
222 expected = 'A.B'
223 self.assertEquals(expected, actual)
224
225 def testTestNameWithoutDisabledPrefix_flaky(self):
226 test_name_list = [
227 'A.FLAKY_B',
228 'FLAKY_A.B',
229 'FLAKY_A.FLAKY_B',
230 ]
231 for test_name in test_name_list:
232 actual = gtest_test_instance \
233 .TestNameWithoutDisabledPrefix(test_name)
234 expected = 'A.B'
235 self.assertEquals(expected, actual)
236
237 def testTestNameWithoutDisabledPrefix_notDisabledOrFlaky(self):
238 test_name = 'A.B'
239 actual = gtest_test_instance \
240 .TestNameWithoutDisabledPrefix(test_name)
241 expected = 'A.B'
242 self.assertEquals(expected, actual)
243
213 244
214 if __name__ == '__main__': 245 if __name__ == '__main__':
215 unittest.main(verbosity=2) 246 unittest.main(verbosity=2)
216 247
OLDNEW
« no previous file with comments | « build/android/pylib/gtest/gtest_test_instance.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698