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

Unified Diff: tools/auto_bisect/bisect_perf_regression_test.py

Issue 1001033004: Fix style in tools/auto_bisect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 9 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
« no previous file with comments | « tools/auto_bisect/bisect_perf_regression.py ('k') | tools/auto_bisect/bisect_printer.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/auto_bisect/bisect_perf_regression_test.py
diff --git a/tools/auto_bisect/bisect_perf_regression_test.py b/tools/auto_bisect/bisect_perf_regression_test.py
index 3060f451781e559811639fd8c71aa3650ec9b68d..276cdebca7383fef54c8fc9131e2b1292346bb76 100644
--- a/tools/auto_bisect/bisect_perf_regression_test.py
+++ b/tools/auto_bisect/bisect_perf_regression_test.py
@@ -70,31 +70,31 @@ CLEAR_REGRESSION = [
MULTIPLE_VALUES = [
[
[18.916, 22.371, 8.527, 5.877, 5.407, 9.476, 8.100, 5.334,
- 4.507, 4.842, 8.485, 8.308, 27.490, 4.560, 4.804, 23.068, 17.577,
- 17.346, 26.738, 60.330, 32.307, 5.468, 27.803, 27.373, 17.823,
- 5.158, 27.439, 5.236, 11.413],
+ 4.507, 4.842, 8.485, 8.308, 27.490, 4.560, 4.804, 23.068, 17.577,
+ 17.346, 26.738, 60.330, 32.307, 5.468, 27.803, 27.373, 17.823,
+ 5.158, 27.439, 5.236, 11.413],
[18.999, 22.642, 8.158, 5.995, 5.495, 9.499, 8.092, 5.324,
- 4.468, 4.788, 8.248, 7.853, 27.533, 4.410, 4.622, 22.341, 22.313,
- 17.072, 26.731, 57.513, 33.001, 5.500, 28.297, 27.277, 26.462,
- 5.009, 27.361, 5.130, 10.955]
+ 4.468, 4.788, 8.248, 7.853, 27.533, 4.410, 4.622, 22.341, 22.313,
+ 17.072, 26.731, 57.513, 33.001, 5.500, 28.297, 27.277, 26.462,
+ 5.009, 27.361, 5.130, 10.955]
],
[
[18.238, 22.365, 8.555, 5.939, 5.437, 9.463, 7.047, 5.345, 4.517,
- 4.796, 8.593, 7.901, 27.499, 4.378, 5.040, 4.904, 4.816, 4.828,
- 4.853, 57.363, 34.184, 5.482, 28.190, 27.290, 26.694, 5.099,
- 4.905, 5.290, 4.813],
+ 4.796, 8.593, 7.901, 27.499, 4.378, 5.040, 4.904, 4.816, 4.828,
+ 4.853, 57.363, 34.184, 5.482, 28.190, 27.290, 26.694, 5.099,
+ 4.905, 5.290, 4.813],
[18.301, 22.522, 8.035, 6.021, 5.565, 9.037, 6.998, 5.321, 4.485,
- 4.768, 8.397, 7.865, 27.636, 4.640, 5.015, 4.962, 4.933, 4.977,
- 4.961, 60.648, 34.593, 5.538, 28.454, 27.297, 26.490, 5.099, 5,
- 5.247, 4.945],
+ 4.768, 8.397, 7.865, 27.636, 4.640, 5.015, 4.962, 4.933, 4.977,
+ 4.961, 60.648, 34.593, 5.538, 28.454, 27.297, 26.490, 5.099, 5,
+ 5.247, 4.945],
[18.907, 23.368, 8.100, 6.169, 5.621, 9.971, 8.161, 5.331, 4.513,
- 4.837, 8.255, 7.852, 26.209, 4.388, 5.045, 5.029, 5.032, 4.946,
- 4.973, 60.334, 33.377, 5.499, 28.275, 27.550, 26.103, 5.108,
- 4.951, 5.285, 4.910],
+ 4.837, 8.255, 7.852, 26.209, 4.388, 5.045, 5.029, 5.032, 4.946,
+ 4.973, 60.334, 33.377, 5.499, 28.275, 27.550, 26.103, 5.108,
+ 4.951, 5.285, 4.910],
[18.715, 23.748, 8.128, 6.148, 5.691, 9.361, 8.106, 5.334, 4.528,
- 4.965, 8.261, 7.851, 27.282, 4.391, 4.949, 4.981, 4.964, 4.935,
- 4.933, 60.231, 33.361, 5.489, 28.106, 27.457, 26.648, 5.108,
- 4.963, 5.272, 4.954]
+ 4.965, 8.261, 7.851, 27.282, 4.391, 4.949, 4.981, 4.964, 4.935,
+ 4.933, 60.231, 33.361, 5.489, 28.106, 27.457, 26.648, 5.108,
+ 4.963, 5.272, 4.954]
]
]
@@ -115,8 +115,7 @@ DEFAULT_OPTIONS = {
_MockResultsGenerator = (x for x in [])
-def _MockRunTests(*args, **kwargs):
- _, _ = args, kwargs
+def _MockRunTests(*args, **kwargs): # pylint: disable=unused-argument
return _FakeTestResult(_MockResultsGenerator.next())
@@ -379,7 +378,7 @@ class BisectPerfRegressionTest(unittest.TestCase):
bisect_class.RunPerformanceTestAndParseResults = _MockRunTests
try:
- _GenericDryRun(_GetExtendedOptions(0, 0, False))
+ dry_run_results = _GenericDryRun(_GetExtendedOptions(0, 0, False))
except StopIteration:
# If StopIteration was raised, that means that the next value after
# the first two values was requested, so the job was not aborted.
@@ -388,23 +387,23 @@ class BisectPerfRegressionTest(unittest.TestCase):
bisect_class.RunPerformanceTestAndParseResults = original_run_tests
# If the job was aborted, there should be a warning about it.
- assert [w for w in results.warnings
+ assert [w for w in dry_run_results.warnings
if 'could not reproduce the regression' in w]
return True
- def testBisectStopsOnClearUnclearRegression(self):
+ def testBisectAbortedOnClearNonRegression(self):
self.assertTrue(self._CheckAbortsEarly(CLEAR_NON_REGRESSION))
- def testBisectStopsOnClearUnclearRegression(self):
+ def testBisectNotAborted_AlmostRegression(self):
self.assertFalse(self._CheckAbortsEarly(ALMOST_REGRESSION))
- def testBisectStopsOnClearUnclearRegression(self):
+ def testBisectNotAborted_ClearRegression(self):
self.assertFalse(self._CheckAbortsEarly(CLEAR_REGRESSION))
- def testBisectStopsOnClearUnclearRegression(self):
+ def testBisectNotAborted_BarelyRegression(self):
self.assertFalse(self._CheckAbortsEarly(BARELY_REGRESSION))
- def testBisectStopsOnClearUnclearRegression(self):
+ def testBisectNotAborted_MultipleValues(self):
self.assertFalse(self._CheckAbortsEarly(MULTIPLE_VALUES))
def testGetCommitPosition(self):
@@ -467,8 +466,8 @@ class BisectPerfRegressionTest(unittest.TestCase):
'--force',
'--delete_unversioned_trees',
'--revision',
- 'src@e6db23a037cad47299a94b155b95eebd1ee61a58'
- ]
+ 'src@e6db23a037cad47299a94b155b95eebd1ee61a58',
+ ]
mock_RunGClient.assert_called_with(expected_params, cwd=None)
@@ -477,16 +476,18 @@ class BisectPerfRegressionTest(unittest.TestCase):
bisect_instance = _GetBisectPerformanceMetricsInstance(DEFAULT_OPTIONS)
mock_RunGit.return_value = None, None
bisect_instance._SyncRevision(
- 'webkit', 'a94d028e0f2c77f159b3dac95eb90c3b4cf48c61' , None)
+ 'webkit', 'a94d028e0f2c77f159b3dac95eb90c3b4cf48c61', None)
expected_params = ['checkout', 'a94d028e0f2c77f159b3dac95eb90c3b4cf48c61']
mock_RunGit.assert_called_with(expected_params)
def testTryJobSvnRepo_PerfBuilderType_ReturnsRepoUrl(self):
- self.assertEqual(bisect_perf_regression.PERF_SVN_REPO_URL,
+ self.assertEqual(
+ bisect_perf_regression.PERF_SVN_REPO_URL,
bisect_perf_regression._TryJobSvnRepo(fetch_build.PERF_BUILDER))
def testTryJobSvnRepo_FullBuilderType_ReturnsRepoUrl(self):
- self.assertEqual(bisect_perf_regression.FULL_SVN_REPO_URL,
+ self.assertEqual(
+ bisect_perf_regression.FULL_SVN_REPO_URL,
bisect_perf_regression._TryJobSvnRepo(fetch_build.FULL_BUILDER))
def testTryJobSvnRepo_WithUnknownBuilderType_ThrowsError(self):
@@ -672,8 +673,8 @@ class GitTryJobTestCases(unittest.TestCase):
'--revision=%s' % git_revision,
'--name=%s' % bisect_job_name,
'--svn_repo=%s' % bisect_perf_regression.PERF_SVN_REPO_URL,
- '--diff=%s' % patch_content
- ], (None, 1)),
+ '--diff=%s' % patch_content],
+ (None, 1)),
]
self._AssertRunGitExceptions(
try_cmd, bisect_perf_regression._StartBuilderTryJob,
@@ -702,8 +703,8 @@ class GitTryJobTestCases(unittest.TestCase):
'--revision=%s' % git_revision,
'--name=%s' % bisect_job_name,
'--svn_repo=%s' % bisect_perf_regression.PERF_SVN_REPO_URL,
- '--diff=%s' % patch_content
- ], (None, 0)),
+ '--diff=%s' % patch_content],
+ (None, 0)),
]
self._SetupRunGitMock(try_cmd)
bisect_perf_regression._StartBuilderTryJob(
« no previous file with comments | « tools/auto_bisect/bisect_perf_regression.py ('k') | tools/auto_bisect/bisect_printer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698