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

Side by Side Diff: telemetry/examples/browser_tests/simple_sharding_test.py

Issue 2562913003: Move browser_test_runner.LoadAllTestsInModule to serially_executed_browser_test_case (Closed)
Patch Set: Fix test 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
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 import sys
6
5 from telemetry.testing import serially_executed_browser_test_case 7 from telemetry.testing import serially_executed_browser_test_case
6 8
7 9
8 class SimpleShardingTest( 10 class SimpleShardingTest(
9 serially_executed_browser_test_case.SeriallyExecutedBrowserTestCase): 11 serially_executed_browser_test_case.SeriallyExecutedBrowserTestCase):
10 12
11 def Test1(self): 13 def Test1(self):
12 pass 14 pass
13 15
14 def Test2(self): 16 def Test2(self):
15 pass 17 pass
16 18
17 def Test3(self): 19 def Test3(self):
18 pass 20 pass
19 21
20 @classmethod 22 @classmethod
21 def GenerateTestCases_PassingTest(cls, options): 23 def GenerateTestCases_PassingTest(cls, options):
22 del options # unused 24 del options # unused
23 for i in xrange(10): 25 for i in xrange(10):
24 yield 'passing_test_' + str(i), (i,) 26 yield 'passing_test_' + str(i), (i,)
25 27
26 def PassingTest(self, a): 28 def PassingTest(self, a):
27 self.assertGreaterEqual(a, 0) 29 self.assertGreaterEqual(a, 0)
30
31
32 def load_tests(loader, tests, pattern):
33 del loader, tests, pattern # Unused.
34 return serially_executed_browser_test_case.LoadAllTestsInModule(
35 sys.modules[__name__])
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698