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

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

Issue 196533021: rebaseline_server: make intermediate JSON specify base urls for diff images (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nits Created 6 years, 9 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
« no previous file with comments | « gm/rebaseline_server/imagepairset.py ('k') | gm/rebaseline_server/results.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 imagepairset.py 9 Test imagepairset.py
10 """ 10 """
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 'headerUrl': 'http://learn/about/gm/tests', 99 'headerUrl': 'http://learn/about/gm/tests',
100 'isFilterable': True, 100 'isFilterable': True,
101 'isSortable': False, 101 'isSortable': False,
102 }, 102 },
103 }, 103 },
104 'imagePairs': [ 104 'imagePairs': [
105 IMAGEPAIR_1_AS_DICT, 105 IMAGEPAIR_1_AS_DICT,
106 IMAGEPAIR_2_AS_DICT, 106 IMAGEPAIR_2_AS_DICT,
107 IMAGEPAIR_3_AS_DICT, 107 IMAGEPAIR_3_AS_DICT,
108 ], 108 ],
109 'imageSets': [ 109 'imageSets': {
110 { 110 'imageA': {
111 'baseUrl': BASE_URL_1, 111 'baseUrl': BASE_URL_1,
112 'description': SET_A_DESCRIPTION, 112 'description': SET_A_DESCRIPTION,
113 }, 113 },
114 { 114 'imageB': {
115 'baseUrl': BASE_URL_1, 115 'baseUrl': BASE_URL_1,
116 'description': SET_B_DESCRIPTION, 116 'description': SET_B_DESCRIPTION,
117 }, 117 },
118 ], 118 'diffs': {
119 'baseUrl': '/static/generated-images/diffs',
120 'description': 'color difference per channel',
121 },
122 'whiteDiffs': {
123 'baseUrl': '/static/generated-images/whitediffs',
124 'description': 'differing pixels in white',
125 },
126 },
119 } 127 }
120 128
121 image_pair_set = imagepairset.ImagePairSet( 129 image_pair_set = imagepairset.ImagePairSet(
122 descriptions=(SET_A_DESCRIPTION, SET_B_DESCRIPTION)) 130 descriptions=(SET_A_DESCRIPTION, SET_B_DESCRIPTION))
123 for image_pair in image_pairs: 131 for image_pair in image_pairs:
124 image_pair_set.add_image_pair(image_pair) 132 image_pair_set.add_image_pair(image_pair)
125 # The 'builder' column header uses the default settings, 133 # The 'builder' column header uses the default settings,
126 # but the 'test' column header has manual adjustments. 134 # but the 'test' column header has manual adjustments.
127 image_pair_set.set_column_header_factory( 135 image_pair_set.set_column_header_factory(
128 'test', 136 'test',
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 return self._dict_to_return 172 return self._dict_to_return
165 173
166 174
167 def main(): 175 def main():
168 suite = unittest.TestLoader().loadTestsFromTestCase(ImagePairSetTest) 176 suite = unittest.TestLoader().loadTestsFromTestCase(ImagePairSetTest)
169 unittest.TextTestRunner(verbosity=2).run(suite) 177 unittest.TextTestRunner(verbosity=2).run(suite)
170 178
171 179
172 if __name__ == '__main__': 180 if __name__ == '__main__':
173 main() 181 main()
OLDNEW
« no previous file with comments | « gm/rebaseline_server/imagepairset.py ('k') | gm/rebaseline_server/results.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698