| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 """ | 3 """ |
| 4 Copyright 2014 Google Inc. | 4 Copyright 2014 Google Inc. |
| 5 | 5 |
| 6 Use of this source code is governed by a BSD-style license that can be | 6 Use of this source code is governed by a BSD-style license that can be |
| 7 found in the LICENSE file. | 7 found in the LICENSE file. |
| 8 | 8 |
| 9 Test imagepair.py | 9 Test imagepair.py |
| 10 """ | 10 """ |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 # inputs: | 58 # inputs: |
| 59 'arcofzorro/16206093933823793653.png', | 59 'arcofzorro/16206093933823793653.png', |
| 60 'arcofzorro/16206093933823793653.png', | 60 'arcofzorro/16206093933823793653.png', |
| 61 None, | 61 None, |
| 62 { | 62 { |
| 63 'builder': 'MyBuilder', | 63 'builder': 'MyBuilder', |
| 64 'test': 'MyTest', | 64 'test': 'MyTest', |
| 65 }, | 65 }, |
| 66 # expected output: | 66 # expected output: |
| 67 { | 67 { |
| 68 'extraColumnValues': { | 68 'extraColumns': { |
| 69 'builder': 'MyBuilder', | 69 'builder': 'MyBuilder', |
| 70 'test': 'MyTest', | 70 'test': 'MyTest', |
| 71 }, | 71 }, |
| 72 'imageAUrl': 'arcofzorro/16206093933823793653.png', | 72 'imageAUrl': 'arcofzorro/16206093933823793653.png', |
| 73 'imageBUrl': 'arcofzorro/16206093933823793653.png', | 73 'imageBUrl': 'arcofzorro/16206093933823793653.png', |
| 74 'isDifferent': False, | 74 'isDifferent': False, |
| 75 }, | 75 }, |
| 76 ], | 76 ], |
| 77 | 77 |
| 78 [ | 78 [ |
| (...skipping 29 matching lines...) Expand all Loading... |
| 108 'test': 'MyTest', | 108 'test': 'MyTest', |
| 109 }, | 109 }, |
| 110 # expected output: | 110 # expected output: |
| 111 { | 111 { |
| 112 'differenceData': { | 112 'differenceData': { |
| 113 'maxDiffPerChannel': [255, 0, 255], | 113 'maxDiffPerChannel': [255, 0, 255], |
| 114 'numDifferingPixels': 102400, | 114 'numDifferingPixels': 102400, |
| 115 'percentDifferingPixels': 100.00, | 115 'percentDifferingPixels': 100.00, |
| 116 'weightedDiffMeasure': 66.66666666666667, | 116 'weightedDiffMeasure': 66.66666666666667, |
| 117 }, | 117 }, |
| 118 'expectationsData': { | 118 'expectations': { |
| 119 'bugs': [1001, 1002], | 119 'bugs': [1001, 1002], |
| 120 'ignoreFailure': True, | 120 'ignoreFailure': True, |
| 121 }, | 121 }, |
| 122 'extraColumnValues': { | 122 'extraColumns': { |
| 123 'builder': 'MyBuilder', | 123 'builder': 'MyBuilder', |
| 124 'test': 'MyTest', | 124 'test': 'MyTest', |
| 125 }, | 125 }, |
| 126 'imageAUrl': | 126 'imageAUrl': |
| 127 'gradients_degenerate_2pt/10552995703607727960.png', | 127 'gradients_degenerate_2pt/10552995703607727960.png', |
| 128 'imageBUrl': | 128 'imageBUrl': |
| 129 'gradients_degenerate_2pt/11198253335583713230.png', | 129 'gradients_degenerate_2pt/11198253335583713230.png', |
| 130 'isDifferent': True, | 130 'isDifferent': True, |
| 131 }, | 131 }, |
| 132 ], | 132 ], |
| (...skipping 11 matching lines...) Expand all Loading... |
| 144 self.assertEqual(image_pair.as_dict(), selftest[4]) | 144 self.assertEqual(image_pair.as_dict(), selftest[4]) |
| 145 | 145 |
| 146 | 146 |
| 147 def main(): | 147 def main(): |
| 148 suite = unittest.TestLoader().loadTestsFromTestCase(ImagePairTest) | 148 suite = unittest.TestLoader().loadTestsFromTestCase(ImagePairTest) |
| 149 unittest.TextTestRunner(verbosity=2).run(suite) | 149 unittest.TextTestRunner(verbosity=2).run(suite) |
| 150 | 150 |
| 151 | 151 |
| 152 if __name__ == '__main__': | 152 if __name__ == '__main__': |
| 153 main() | 153 main() |
| OLD | NEW |