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

Side by Side Diff: build/android/pylib/perf/surface_stats_collector_unittest.py

Issue 153743008: Revert of Enable presubmit pylint in build/android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merging with changes to pylib/linker/test_case.py. Created 6 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 unified diff | Download patch
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 """Unittests for SurfaceStatsCollector.""" 5 """Unittests for SurfaceStatsCollector."""
6 # pylint: disable=W0212
7 6
8 import unittest 7 import unittest
9 8
10 from pylib.perf.surface_stats_collector import SurfaceStatsCollector 9 from surface_stats_collector import SurfaceStatsCollector
11
12 10
13 class TestSurfaceStatsCollector(unittest.TestCase): 11 class TestSurfaceStatsCollector(unittest.TestCase):
14 @staticmethod 12 @staticmethod
15 def _CreateUniformTimestamps(base, num, delta): 13 def _CreateUniformTimestamps(base, num, delta):
16 return [base + i * delta for i in range(1, num + 1)] 14 return [base + i * delta for i in range(1, num + 1)]
17 15
18 @staticmethod 16 @staticmethod
19 def _CreateDictionaryFromResults(results): 17 def _CreateDictionaryFromResults(results):
20 dictionary = {} 18 dictionary = {}
21 for result in results: 19 for result in results:
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 53
56 results = self._CreateDictionaryFromResults( 54 results = self._CreateDictionaryFromResults(
57 SurfaceStatsCollector._CalculateResults( 55 SurfaceStatsCollector._CalculateResults(
58 self.refresh_period, timestamps, '')) 56 self.refresh_period, timestamps, ''))
59 57
60 self.assertEquals(len(results['frame_lengths'].value), 9) 58 self.assertEquals(len(results['frame_lengths'].value), 9)
61 59
62 60
63 if __name__ == '__main__': 61 if __name__ == '__main__':
64 unittest.main() 62 unittest.main()
OLDNEW
« no previous file with comments | « build/android/pylib/perf/surface_stats_collector.py ('k') | build/android/pylib/perf/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698