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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
80 'arcofzorro/16206093933823793653.png', | 80 'arcofzorro/16206093933823793653.png', |
81 'arcofzorro/13786535001616823825.png', | 81 'arcofzorro/13786535001616823825.png', |
82 None, | 82 None, |
83 None, | 83 None, |
84 # expected output: | 84 # expected output: |
85 { | 85 { |
86 'differenceData': { | 86 'differenceData': { |
87 'maxDiffPerChannel': [255, 255, 247], | 87 'maxDiffPerChannel': [255, 255, 247], |
88 'numDifferingPixels': 662, | 88 'numDifferingPixels': 662, |
89 'percentDifferingPixels': 0.0662, | 89 'percentDifferingPixels': 0.0662, |
90 'perceptualDifference': 0.06620000000000914, | 90 'perceptualDifference': 0.06620300000000157, |
epoger
2014/06/12 07:02:07
There are minute changes to the perceptual differe
| |
91 }, | 91 }, |
92 'imageAUrl': 'arcofzorro/16206093933823793653.png', | 92 'imageAUrl': 'arcofzorro/16206093933823793653.png', |
93 'imageBUrl': 'arcofzorro/13786535001616823825.png', | 93 'imageBUrl': 'arcofzorro/13786535001616823825.png', |
94 'isDifferent': True, | 94 'isDifferent': True, |
95 }, | 95 }, |
96 ], | 96 ], |
97 | 97 |
98 [ | 98 [ |
99 # inputs: | 99 # inputs: |
100 'gradients_degenerate_2pt/10552995703607727960.png', | 100 'gradients_degenerate_2pt/10552995703607727960.png', |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
174 self.assertEqual(image_pair.as_dict(), selftest[4]) | 174 self.assertEqual(image_pair.as_dict(), selftest[4]) |
175 | 175 |
176 | 176 |
177 def main(): | 177 def main(): |
178 suite = unittest.TestLoader().loadTestsFromTestCase(ImagePairTest) | 178 suite = unittest.TestLoader().loadTestsFromTestCase(ImagePairTest) |
179 unittest.TextTestRunner(verbosity=2).run(suite) | 179 unittest.TextTestRunner(verbosity=2).run(suite) |
180 | 180 |
181 | 181 |
182 if __name__ == '__main__': | 182 if __name__ == '__main__': |
183 main() | 183 main() |
OLD | NEW |