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

Unified Diff: scripts/slave/recipe_modules/auto_bisect/bisector_test.py

Issue 1610203003: Iteratively increase sample size for good/bad classification. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Rebasing Created 4 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 side-by-side diff with in-line comments
Download patch
Index: scripts/slave/recipe_modules/auto_bisect/bisector_test.py
diff --git a/scripts/slave/recipe_modules/auto_bisect/bisector_test.py b/scripts/slave/recipe_modules/auto_bisect/bisector_test.py
index 78bff4312cc1adf236618796782a95076d8a16d6..6813a259a43f4b45a06262fa23b781730dfca847 100755
--- a/scripts/slave/recipe_modules/auto_bisect/bisector_test.py
+++ b/scripts/slave/recipe_modules/auto_bisect/bisector_test.py
@@ -130,9 +130,9 @@ class BisectorTest(unittest.TestCase): # pragma: no cover
def test_check_initial_confidence_one_hundred(self):
# A confidence score of 100 should satisfy any default.
- mock_score = self.dummy_api.m.math_utils.confidence_score
- mock_score.return_value = 100
bisector = Bisector(self.dummy_api, self.bisect_config, MockRevisionClass)
+ bisector.good_rev.values = [3, 3, 3, 3, 3, 3]
+ bisector.bad_rev.values = [9, 9, 9, 9, 9, 9]
self.assertTrue(bisector.check_initial_confidence())
self.assertFalse(bisector.failed_initial_confidence)
@@ -156,18 +156,6 @@ class BisectorTest(unittest.TestCase): # pragma: no cover
self.assertFalse(bisector.check_initial_confidence())
self.assertTrue(bisector.failed_initial_confidence)
- def test_check_initial_confidence_pass(self):
- mock_score = self.dummy_api.m.math_utils.confidence_score
- self.bisect_config['required_initial_confidence'] = 99
- # A confidence score of 99.5 should satisfy the required 99.
- mock_score.return_value = 99.5
- bisector = Bisector(self.dummy_api, self.bisect_config, MockRevisionClass)
- # The initial confidence check may only apply if there are some values.
- bisector.good_rev.values = [3, 3, 3, 3, 3, 3]
- bisector.bad_rev.values = [3, 3, 3, 3, 3, 3]
- self.assertTrue(bisector.check_initial_confidence())
- self.assertFalse(bisector.failed_initial_confidence)
-
if __name__ == '__main__':
unittest.main() # pragma: no cover
« no previous file with comments | « scripts/slave/recipe_modules/auto_bisect/bisector.py ('k') | scripts/slave/recipe_modules/auto_bisect/example.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698