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

Side by Side Diff: telemetry/examples/browser_tests/simple_numeric_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 string 5 import string
6 import sys
6 import time 7 import time
7 8
8 from telemetry.testing import serially_executed_browser_test_case 9 from telemetry.testing import serially_executed_browser_test_case
9 10
10 11
11 _prev_test_name = None 12 _prev_test_name = None
12 13
13 class SimpleTest( 14 class SimpleTest(
14 serially_executed_browser_test_case.SeriallyExecutedBrowserTestCase): 15 serially_executed_browser_test_case.SeriallyExecutedBrowserTestCase):
15 16
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 67
67 def MultiplierTest(self, a, b, partial_sum): 68 def MultiplierTest(self, a, b, partial_sum):
68 self.assertEqual(a * b, partial_sum * self.extra) 69 self.assertEqual(a * b, partial_sum * self.extra)
69 70
70 def TestSimple(self): 71 def TestSimple(self):
71 time.sleep(0.5) 72 time.sleep(0.5)
72 self.assertEqual(1, self.extra) 73 self.assertEqual(1, self.extra)
73 74
74 def TestException(self): 75 def TestException(self):
75 raise Exception('Expected exception') 76 raise Exception('Expected exception')
77
78
79 def load_tests(loader, tests, pattern):
80 del loader, tests, pattern # Unused.
81 return serially_executed_browser_test_case.LoadAllTestsInModule(
82 sys.modules[__name__])
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698