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

Side by Side Diff: tools/perf/core/benchmark_finders_unittest.py

Issue 2228413003: [tools/perf] Enable many more lint checks for perf directory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Petr's comment Created 4 years, 4 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
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 import os 4 import os
5 import unittest 5 import unittest
6 6
7 from core import benchmark_finders 7 from core import benchmark_finders
8 8
9 9
10 class TestGetBenchmarkNamesForFile(unittest.TestCase): 10 class TestGetBenchmarkNamesForFile(unittest.TestCase):
11 11
12 def setUp(self): 12 def setUp(self):
13 self.top_level_dir = os.path.abspath( 13 self.top_level_dir = os.path.abspath(
14 os.path.join(os.path.dirname(__file__), 'test_data')) 14 os.path.join(os.path.dirname(__file__), 'test_data'))
15 15
16 def testListSimpleBenchmarksDefinedInOneFile(self): 16 def testListSimpleBenchmarksDefinedInOneFile(self):
17 self.assertEquals( 17 self.assertEquals(
18 benchmark_finders.GetBenchmarkNamesForFile( 18 benchmark_finders.GetBenchmarkNamesForFile(
19 self.top_level_dir, 19 self.top_level_dir,
20 os.path.join( 20 os.path.join(
21 self.top_level_dir, 21 self.top_level_dir,
22 'simple_benchmarks_case.py')), 22 'simple_benchmarks_case.py')),
23 ['test_benchmark_1', 'test_benchmark_2', 'test_benchmark_subclass_1', 23 ['test_benchmark_1', 'test_benchmark_2', 'test_benchmark_subclass_1',
24 'test_benchmark_subclass_2']) 24 'test_benchmark_subclass_2'])
25 25
26 def testListSimpleBenchmarksDefinedInOneFile(self): 26 def testListSimpleBenchmarksDefinedInOneFileComplex(self):
27 self.assertEquals( 27 self.assertEquals(
28 benchmark_finders.GetBenchmarkNamesForFile( 28 benchmark_finders.GetBenchmarkNamesForFile(
29 self.top_level_dir, 29 self.top_level_dir,
30 os.path.join( 30 os.path.join(
31 self.top_level_dir, 31 self.top_level_dir,
32 'complex_benchmarks_case.py')), 32 'complex_benchmarks_case.py')),
33 ['test_benchmark_complex_1', 'test_benchmark_complex_subclass', 33 ['test_benchmark_complex_1', 'test_benchmark_complex_subclass',
34 'test_benchmark_complex_subclass_from_other_module']) 34 'test_benchmark_complex_subclass_from_other_module'])
OLDNEW
« no previous file with comments | « tools/perf/benchmarks/benchmark_smoke_unittest.py ('k') | tools/perf/measurements/clock_domain_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698