failed_tests.py 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. import sys
  5. from telemetry.testing import serially_executed_browser_test_case
  6. class SetUpClassFailedTest(
  7. serially_executed_browser_test_case.SeriallyExecutedBrowserTestCase):
  8. @classmethod
  9. def setUpClass(cls):
  10. raise Exception
  11. @classmethod
  12. def GenerateTestCases_DummyTest(cls, options):
  13. del options # Unused.
  14. for i in xrange(0, 100):
  15. yield 'dummy_test_%i' % i, ()
  16. def DummyTest(self):
  17. pass
  18. class TearDownClassFailedTest(
  19. serially_executed_browser_test_case.SeriallyExecutedBrowserTestCase):
  20. @classmethod
  21. def tearDownClass(cls):
  22. raise Exception
  23. @classmethod
  24. def GenerateTestCases_DummyTest(cls, options):
  25. del options # Unused.
  26. for i in xrange(0, 100):
  27. yield 'dummy_test_%i' % i, ()
  28. def DummyTest(self):
  29. pass
  30. def load_tests(loader, tests, pattern):
  31. del loader, tests, pattern # Unused.
  32. return serially_executed_browser_test_case.LoadAllTestsInModule(
  33. sys.modules[__name__])