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

Unified Diff: tools/auto_bisect/ttest_test.py

Issue 616903003: Shortening thank you message for a cleaner output. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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: tools/auto_bisect/ttest_test.py
diff --git a/tools/auto_bisect/ttest_test.py b/tools/auto_bisect/ttest_test.py
index 9ab082bdc71eda8e8865ecf9f8fcd52e38abd913..b457d09035801af2b3af0543459ffcb82c3fa70a 100644
--- a/tools/auto_bisect/ttest_test.py
+++ b/tools/auto_bisect/ttest_test.py
@@ -62,7 +62,7 @@ class TTestTest(unittest.TestCase):
t, _, p = ttest.WelchsTTest(
[100, 101, 100, 101, 100], [1, 2, 1, 2, 1, 2, 1, 2])
self.assertGreaterEqual(t, 250)
- self.assertLessEqual(0.01, p)
+ self.assertLessEqual(p, 0.01)
def testTTestVariance(self):
"""Verifies that higher variance -> higher p value."""
@@ -87,6 +87,8 @@ class LookupTableTest(unittest.TestCase):
"""Tests for functionality related to lookup of p-values in a table."""
def setUp(self):
+ self.original_TWO_TAIL = ttest.TWO_TAIL
+ self.original_TABLE = ttest.TABLE
ttest.TWO_TAIL = [1, 0.2, 0.1, 0.05, 0.02, 0.01]
ttest.TABLE = {
1: [0, 6.314, 12.71, 31.82, 63.66, 318.31],
@@ -95,6 +97,10 @@ class LookupTableTest(unittest.TestCase):
4: [0, 2.132, 2.776, 3.747, 4.604, 7.173],
}
+ def tearDown(self):
+ ttest.TWO_TAIL = self.original_TWO_TAIL
+ ttest.TABLE = self.original_TABLE
+
def testLookupExactMatch(self):
"""Tests a lookup when there is an exact match."""
self.assertEqual(0.1, ttest._LookupPValue(3.182, 3))
« tools/auto_bisect/bisect_perf_regression.py ('K') | « tools/auto_bisect/bisect_perf_regression.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698