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

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

Issue 2701253008: Reland of [Telemetry] Migrate browser_test_runner to use typ as the test runner (Closed)
Patch Set: Created 3 years, 10 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 2017 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 sys
6
7 from telemetry.testing import serially_executed_browser_test_case
8
9
10 class FailIfSetUpProcessCalledTwice(
11 serially_executed_browser_test_case.SeriallyExecutedBrowserTestCase):
12 count = 0
13
14 @classmethod
15 def SetUpProcess(cls):
16 cls.count += 1
17 if cls.count >= 2:
18 assert False, 'This should not be called more than once'
19
20 @classmethod
21 def GenerateTestCases_DummyTest(cls, options):
22 del options # Unused.
23 for i in xrange(0, 3):
24 yield 'Dummy_%i' % i, ()
25
26 def DummyTest(self):
27 pass
28
29
30 class FailIfTearDownProcessCalledTwice(
31 serially_executed_browser_test_case.SeriallyExecutedBrowserTestCase):
32 count = 0
33
34 @classmethod
35 def TearDownProcess(cls):
36 cls.count += 1
37 if cls.count >= 2:
38 assert False, 'This should not be called more than once'
39
40 @classmethod
41 def GenerateTestCases_DummyTest(cls, options):
42 del options # Unused.
43 for i in xrange(0, 3):
44 yield 'Dummy_%i' % i, ()
45
46 def DummyTest(self):
47 pass
48
49
50 def load_tests(loader, tests, pattern):
51 del loader, tests, pattern # Unused.
52 return serially_executed_browser_test_case.LoadAllTestsInModule(
53 sys.modules[__name__])
OLDNEW
« no previous file with comments | « telemetry/examples/browser_tests/failed_tests.py ('k') | telemetry/examples/browser_tests/sample_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698