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

Side by Side Diff: scripts/slave/recipe_modules/auto_bisect/resources/significantly_different_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: Making initial regression check have a timeout. 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 unified diff | Download patch
OLDNEW
(Empty)
1 #!/usr/bin/python
dtu 2016/02/05 00:18:02 #!/usr/bin/env python
2 """Tests for significantly_different."""
3
4 import os
5 import unittest
6
7 # pylint: disable=relative-import
8 import significantly_different
9
10
11 class SignificantlyDifferentTest(unittest.TestCase):
12
13 def setUp(self):
14 self.conda_path = None
15 try:
16 import scipy # pylint: disable=unused-variable
17 self.conda_path = 'python'
dtu 2016/02/05 00:18:02 sys.executable
18 except ImportError:
19 if os.path.exists(os.path.expanduser('~/conda-test/bin/python')):
20 self.conda_path = os.path.expanduser('~/conda-test/bin/python')
21
22 def test_basic_case(self):
23 results = significantly_different.main(
24 ['', '[1, 2, 3, 3, 2, 1]', '[1, 2, 2, 2, 5, 0]', 0.05], self.conda_path)
25 self.assertAlmostEqual(
26 0.40073980338363635,
27 results['mann_p_value'])
28
29 if __name__ == '__main__':
30 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698