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

Unified Diff: telemetry/examples/browser_tests/process_tests.py

Issue 2700563004: [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 side-by-side diff with in-line comments
Download patch
Index: telemetry/examples/browser_tests/process_tests.py
diff --git a/telemetry/examples/browser_tests/failed_tests.py b/telemetry/examples/browser_tests/process_tests.py
similarity index 59%
copy from telemetry/examples/browser_tests/failed_tests.py
copy to telemetry/examples/browser_tests/process_tests.py
index 42c00dcb63e948fc92640237487166c142cafe60..ada35177c32e04f30f12da64a282b03ecd8a6b34 100644
--- a/telemetry/examples/browser_tests/failed_tests.py
+++ b/telemetry/examples/browser_tests/process_tests.py
@@ -1,4 +1,4 @@
-# Copyright 2016 The Chromium Authors. All rights reserved.
+# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -7,35 +7,41 @@ import sys
from telemetry.testing import serially_executed_browser_test_case
-class SetUpClassFailedTest(
+class FailIfSetUpProcessCalledTwice(
serially_executed_browser_test_case.SeriallyExecutedBrowserTestCase):
+ count = 0
@classmethod
- def setUpClass(cls):
- raise Exception
+ def SetUpProcess(cls):
+ cls.count += 1
+ if cls.count >= 2:
+ assert False, 'This should not be called more than once'
@classmethod
def GenerateTestCases_DummyTest(cls, options):
del options # Unused.
- for i in xrange(0, 100):
- yield 'dummy_test_%i' % i, ()
+ for i in xrange(0, 3):
+ yield 'Dummy_%i' % i, ()
def DummyTest(self):
pass
-class TearDownClassFailedTest(
+class FailIfTearDownProcessCalledTwice(
serially_executed_browser_test_case.SeriallyExecutedBrowserTestCase):
+ count = 0
@classmethod
- def tearDownClass(cls):
- raise Exception
+ def TearDownProcess(cls):
+ cls.count += 1
+ if cls.count >= 2:
+ assert False, 'This should not be called more than once'
@classmethod
def GenerateTestCases_DummyTest(cls, options):
del options # Unused.
- for i in xrange(0, 100):
- yield 'dummy_test_%i' % i, ()
+ for i in xrange(0, 3):
+ yield 'Dummy_%i' % i, ()
def DummyTest(self):
pass
« 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