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

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

Issue 196343009: add schema version to rebaseline_server intermediate JSON (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rename 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/results.py ('k') | gm/rebaseline_server/static/constants.js » ('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 2013 Google Inc. 4 Copyright 2013 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 results.py 9 Test results.py
10 10
(...skipping 17 matching lines...) Expand all
28 28
29 29
30 class ResultsTest(base_unittest.TestCase): 30 class ResultsTest(base_unittest.TestCase):
31 31
32 def test_gm(self): 32 def test_gm(self):
33 """Process results of a GM run with the Results object.""" 33 """Process results of a GM run with the Results object."""
34 results_obj = results.Results( 34 results_obj = results.Results(
35 actuals_root=os.path.join(self._input_dir, 'gm-actuals'), 35 actuals_root=os.path.join(self._input_dir, 'gm-actuals'),
36 expected_root=os.path.join(self._input_dir, 'gm-expectations'), 36 expected_root=os.path.join(self._input_dir, 'gm-expectations'),
37 generated_images_root=self._temp_dir) 37 generated_images_root=self._temp_dir)
38 results_obj.get_timestamp = mock_get_timestamp
38 gm_json.WriteToFile( 39 gm_json.WriteToFile(
39 results_obj.get_results_of_type(results.KEY__HEADER__RESULTS_ALL), 40 results_obj.get_packaged_results_of_type(
41 results.KEY__HEADER__RESULTS_ALL),
40 os.path.join(self._output_dir_actual, 'gm.json')) 42 os.path.join(self._output_dir_actual, 'gm.json'))
41 43
42 44
45 def mock_get_timestamp():
46 """Mock version of Results.get_timestamp() for testing."""
47 return 12345678
48
49
43 def main(): 50 def main():
44 base_unittest.main(ResultsTest) 51 base_unittest.main(ResultsTest)
45 52
46 53
47 if __name__ == '__main__': 54 if __name__ == '__main__':
48 main() 55 main()
OLDNEW
« no previous file with comments | « gm/rebaseline_server/results.py ('k') | gm/rebaseline_server/static/constants.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698