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
3# found in the LICENSE file.
4
5import sys
6
7from telemetry.testing import serially_executed_browser_test_case
8
9
10class SetUpClassFailedTest(
11    serially_executed_browser_test_case.SeriallyExecutedBrowserTestCase):
12
13  @classmethod
14  def setUpClass(cls):
15    raise Exception
16
17  @classmethod
18  def GenerateTestCases_DummyTest(cls, options):
19    del options  # Unused.
20    for i in xrange(0, 3):
21      yield 'dummy_test_%i' % i, ()
22
23  def DummyTest(self):
24    pass
25
26
27class TearDownClassFailedTest(
28    serially_executed_browser_test_case.SeriallyExecutedBrowserTestCase):
29
30  @classmethod
31  def tearDownClass(cls):
32    raise Exception
33
34  @classmethod
35  def GenerateTestCases_DummyTest(cls, options):
36    del options  # Unused.
37    for i in xrange(0, 3):
38      yield 'dummy_test_%i' % i, ()
39
40  def DummyTest(self):
41    pass
42
43
44def load_tests(loader, tests, pattern):
45  del loader, tests, pattern  # Unused.
46  return serially_executed_browser_test_case.LoadAllTestsInModule(
47      sys.modules[__name__])
48