| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Tests for module csv_merger.""" | 6 """Tests for module csv_merger.""" |
| 7 | 7 |
| 8 import datetime | 8 import datetime |
| 9 import filecmp | 9 import filecmp |
| 10 import os | 10 import os |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 os.path.join(self._actual_output_dir, html_file))) | 48 os.path.join(self._actual_output_dir, html_file))) |
| 49 | 49 |
| 50 def test_E2EComparerWithDiscardOutliers(self): | 50 def test_E2EComparerWithDiscardOutliers(self): |
| 51 comparer = csv_comparer.CsvComparer( | 51 comparer = csv_comparer.CsvComparer( |
| 52 csv_file1=os.path.join(self._test_csv_dir, 'comparer_csv1.csv'), | 52 csv_file1=os.path.join(self._test_csv_dir, 'comparer_csv1.csv'), |
| 53 csv_file2=os.path.join(self._test_csv_dir, 'comparer_csv2.csv'), | 53 csv_file2=os.path.join(self._test_csv_dir, 'comparer_csv2.csv'), |
| 54 output_html_dir=self._actual_output_dir, | 54 output_html_dir=self._actual_output_dir, |
| 55 requester_email='superman@krypton.com', | 55 requester_email='superman@krypton.com', |
| 56 chromium_patch_link='http://chromium-patch.com', | 56 chromium_patch_link='http://chromium-patch.com', |
| 57 skia_patch_link='http://skia-patch.com', | 57 skia_patch_link='http://skia-patch.com', |
| 58 benchmark_patch_link='http://benchmark-patch.com', |
| 58 raw_csv_nopatch='http://raw-csv-nopatch.com', | 59 raw_csv_nopatch='http://raw-csv-nopatch.com', |
| 59 raw_csv_withpatch='http://raw-csv-withpatch.com', | 60 raw_csv_withpatch='http://raw-csv-withpatch.com', |
| 60 variance_threshold=10, | 61 variance_threshold=10, |
| 61 absolute_url='', | 62 absolute_url='', |
| 62 min_pages_in_each_field=1, | 63 min_pages_in_each_field=1, |
| 63 discard_outliers=12.5, | 64 discard_outliers=12.5, |
| 64 num_repeated=3, | 65 num_repeated=3, |
| 65 target_platform='Android', | 66 target_platform='Android', |
| 66 crashed_instances='build1-b5 build10-b5', | 67 crashed_instances='build1-b5 build10-b5', |
| 67 missing_devices='build99-b5 build100-b5', | 68 missing_devices='build99-b5 build100-b5', |
| (...skipping 10 matching lines...) Expand all Loading... |
| 78 self._AssertHTMLFiles('discard_outliers') | 79 self._AssertHTMLFiles('discard_outliers') |
| 79 | 80 |
| 80 def test_E2EComparerWithNoDiscardOutliers(self): | 81 def test_E2EComparerWithNoDiscardOutliers(self): |
| 81 comparer = csv_comparer.CsvComparer( | 82 comparer = csv_comparer.CsvComparer( |
| 82 csv_file1=os.path.join(self._test_csv_dir, 'comparer_csv1.csv'), | 83 csv_file1=os.path.join(self._test_csv_dir, 'comparer_csv1.csv'), |
| 83 csv_file2=os.path.join(self._test_csv_dir, 'comparer_csv2.csv'), | 84 csv_file2=os.path.join(self._test_csv_dir, 'comparer_csv2.csv'), |
| 84 output_html_dir=self._actual_output_dir, | 85 output_html_dir=self._actual_output_dir, |
| 85 requester_email='superman@krypton.com', | 86 requester_email='superman@krypton.com', |
| 86 chromium_patch_link='http://chromium-patch.com', | 87 chromium_patch_link='http://chromium-patch.com', |
| 87 skia_patch_link='http://skia-patch.com', | 88 skia_patch_link='http://skia-patch.com', |
| 89 benchmark_patch_link='http://benchmark-patch.com', |
| 88 raw_csv_nopatch='http://raw-csv-nopatch.com', | 90 raw_csv_nopatch='http://raw-csv-nopatch.com', |
| 89 raw_csv_withpatch='http://raw-csv-withpatch.com', | 91 raw_csv_withpatch='http://raw-csv-withpatch.com', |
| 90 variance_threshold=0, | 92 variance_threshold=0, |
| 91 absolute_url='', | 93 absolute_url='', |
| 92 min_pages_in_each_field=0, | 94 min_pages_in_each_field=0, |
| 93 discard_outliers=0, | 95 discard_outliers=0, |
| 94 num_repeated=3, | 96 num_repeated=3, |
| 95 target_platform='Linux', | 97 target_platform='Linux', |
| 96 crashed_instances='', | 98 crashed_instances='', |
| 97 missing_devices='', | 99 missing_devices='', |
| 98 browser_args_nopatch='', | 100 browser_args_nopatch='', |
| 99 browser_args_withpatch='', | 101 browser_args_withpatch='', |
| 100 pageset_type='10k', | 102 pageset_type='10k', |
| 101 chromium_hash='abcdefg1234567', | 103 chromium_hash='abcdefg1234567', |
| 102 skia_hash='tuvwxyz1234567', | 104 skia_hash='tuvwxyz1234567', |
| 103 missing_output_slaves='', | 105 missing_output_slaves='', |
| 104 logs_link_prefix='', | 106 logs_link_prefix='', |
| 105 description='E2EComparerWithNoDiscardOutliers', | 107 description='E2EComparerWithNoDiscardOutliers', |
| 106 ) | 108 ) |
| 107 comparer.Compare() | 109 comparer.Compare() |
| 108 self._AssertHTMLFiles('keep_outliers', | 110 self._AssertHTMLFiles('keep_outliers', |
| 109 ('fieldname2.html', 'fieldname3.html')) | 111 ('fieldname2.html', 'fieldname3.html')) |
| 110 | 112 |
| 111 | 113 |
| 112 if __name__ == '__main__': | 114 if __name__ == '__main__': |
| 113 unittest.main() | 115 unittest.main() |
| 114 | 116 |
| OLD | NEW |