| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 """Tests for significantly_different.""" | 2 """Tests for significantly_different.""" |
| 3 | 3 |
| 4 import os | 4 import os |
| 5 import sys | 5 import sys |
| 6 import unittest | 6 import unittest |
| 7 | 7 |
| 8 # pylint: disable=relative-import | 8 # pylint: disable=relative-import |
| 9 import significantly_different | 9 import significantly_different |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 self.conda_path) | 27 self.conda_path) |
| 28 except significantly_different.ScipyNotInstalledError: | 28 except significantly_different.ScipyNotInstalledError: |
| 29 # This is meant to let presubmit pass on CQ bots :( because they don't | 29 # This is meant to let presubmit pass on CQ bots :( because they don't |
| 30 # have scipy either directly or thorugh anaconda. | 30 # have scipy either directly or thorugh anaconda. |
| 31 return | 31 return |
| 32 | 32 |
| 33 self.assertAlmostEqual( | 33 self.assertAlmostEqual( |
| 34 0.40073980338363635, | 34 0.40073980338363635, |
| 35 results['mann_p_value']) | 35 results['mann_p_value']) |
| 36 | 36 |
| 37 def test_single_value(self): |
| 38 try: |
| 39 results = significantly_different.main( |
| 40 ['', '[1, 1, 1, 1, 1, 1]', '[1, 1, 1]', '0.05'], |
| 41 self.conda_path) |
| 42 self.assertIsNone(results['mann_p_value']) |
| 43 self.assertFalse(results['significantly_different']) |
| 44 except significantly_different.ScipyNotInstalledError: |
| 45 # This is meant to let presubmit pass on CQ bots :( because they don't |
| 46 # have scipy either directly or thorugh anaconda. |
| 47 return |
| 48 |
| 37 if __name__ == '__main__': | 49 if __name__ == '__main__': |
| 38 unittest.main() | 50 unittest.main() |
| OLD | NEW |