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

Side by Side Diff: gm/rebaseline_server/imagepair_test.py

Issue 334533003: rebaseline_server: delete no-longer-used weightedDiffMeasure (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
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.06620000000000914,
91 'weightedDiffMeasure': 0.01127756555171088,
92 }, 91 },
93 'imageAUrl': 'arcofzorro/16206093933823793653.png', 92 'imageAUrl': 'arcofzorro/16206093933823793653.png',
94 'imageBUrl': 'arcofzorro/13786535001616823825.png', 93 'imageBUrl': 'arcofzorro/13786535001616823825.png',
95 'isDifferent': True, 94 'isDifferent': True,
96 }, 95 },
97 ], 96 ],
98 97
99 [ 98 [
100 # inputs: 99 # inputs:
101 'gradients_degenerate_2pt/10552995703607727960.png', 100 'gradients_degenerate_2pt/10552995703607727960.png',
102 'gradients_degenerate_2pt/11198253335583713230.png', 101 'gradients_degenerate_2pt/11198253335583713230.png',
103 { 102 {
104 'ignoreFailure': True, 103 'ignoreFailure': True,
105 'bugs': [1001, 1002], 104 'bugs': [1001, 1002],
106 }, 105 },
107 { 106 {
108 'builder': 'MyBuilder', 107 'builder': 'MyBuilder',
109 'test': 'MyTest', 108 'test': 'MyTest',
110 }, 109 },
111 # expected output: 110 # expected output:
112 { 111 {
113 'differenceData': { 112 'differenceData': {
114 'maxDiffPerChannel': [255, 0, 255], 113 'maxDiffPerChannel': [255, 0, 255],
115 'numDifferingPixels': 102400, 114 'numDifferingPixels': 102400,
116 'percentDifferingPixels': 100.00, 115 'percentDifferingPixels': 100.00,
117 'perceptualDifference': 100.00, 116 'perceptualDifference': 100.00,
118 'weightedDiffMeasure': 66.66666666666667,
119 }, 117 },
120 'expectations': { 118 'expectations': {
121 'bugs': [1001, 1002], 119 'bugs': [1001, 1002],
122 'ignoreFailure': True, 120 'ignoreFailure': True,
123 }, 121 },
124 'extraColumns': { 122 'extraColumns': {
125 'builder': 'MyBuilder', 123 'builder': 'MyBuilder',
126 'test': 'MyTest', 124 'test': 'MyTest',
127 }, 125 },
128 'imageAUrl': 126 'imageAUrl':
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 self.assertEqual(image_pair.as_dict(), selftest[4]) 174 self.assertEqual(image_pair.as_dict(), selftest[4])
177 175
178 176
179 def main(): 177 def main():
180 suite = unittest.TestLoader().loadTestsFromTestCase(ImagePairTest) 178 suite = unittest.TestLoader().loadTestsFromTestCase(ImagePairTest)
181 unittest.TextTestRunner(verbosity=2).run(suite) 179 unittest.TextTestRunner(verbosity=2).run(suite)
182 180
183 181
184 if __name__ == '__main__': 182 if __name__ == '__main__':
185 main() 183 main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698