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

Unified Diff: tools/auto_bisect/bisect_results_test.py

Issue 665893003: Re-applying reverted changes for regression confidence check + fix: ConfidenceScoretakes flat lists (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comments Created 6 years, 2 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_results.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/auto_bisect/bisect_results_test.py
diff --git a/tools/auto_bisect/bisect_results_test.py b/tools/auto_bisect/bisect_results_test.py
index 4b778065e6749cff694f9a00311b4404c21cd495..25359c5e17c3d472178af0020ff931623896d7bf 100644
--- a/tools/auto_bisect/bisect_results_test.py
+++ b/tools/auto_bisect/bisect_results_test.py
@@ -87,22 +87,14 @@ class BisectResultsTest(unittest.TestCase):
bad_values: First list of numbers.
good_values: Second list of numbers.
"""
- # ConfidenceScore takes a list of lists but these lists are flattened
- # inside the function.
- confidence = BisectResults.ConfidenceScore(
- [[v] for v in bad_values],
- [[v] for v in good_values])
+ confidence = BisectResults.ConfidenceScore(bad_values, good_values)
self.assertEqual(score, confidence)
def testConfidenceScoreIsZeroOnTooFewLists(self):
- self._AssertConfidence(0.0, [], [[1], [2]])
- self._AssertConfidence(0.0, [[1], [2]], [])
- self._AssertConfidence(0.0, [[1]], [[1], [2]])
- self._AssertConfidence(0.0, [[1], [2]], [[1]])
-
- def testConfidenceScoreIsZeroOnEmptyLists(self):
- self.assertEqual(BisectResults.ConfidenceScore([[], []], [[1], [2]]), 0.0)
- self.assertEqual(BisectResults.ConfidenceScore([[1], [2]], [[], []]), 0.0)
+ self._AssertConfidence(0.0, [], [1, 2])
+ self._AssertConfidence(0.0, [1, 2], [])
+ self._AssertConfidence(0.0, [1], [1, 2])
+ self._AssertConfidence(0.0, [1, 2], [1])
def testConfidenceScore_ZeroConfidence(self):
# The good and bad sets contain the same values, so the confidence that
« no previous file with comments | « tools/auto_bisect/bisect_results.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698