Chromium Code Reviews| Index: tools/tests/render_pictures_test.py |
| diff --git a/tools/tests/render_pictures_test.py b/tools/tests/render_pictures_test.py |
| index 5ab9d673bb605477c2bd2f4e1859f254328553f0..1d08eb90e05e15ba35fe6ee3fd9a5185ed38dbe1 100755 |
| --- a/tools/tests/render_pictures_test.py |
| +++ b/tools/tests/render_pictures_test.py |
| @@ -269,6 +269,37 @@ class RenderPicturesTest(base_unittest.TestCase): |
| self._assert_directory_contents( |
| write_path_dir, ['red_skp.png', 'green_skp.png']) |
| + def test_untiled_empty_expectations_file(self): |
|
scroggo
2014/05/19 13:28:32
It looks like this function could share code with
epoger
2014/05/19 14:52:00
Good idea. I took a stab at this; please let me k
scroggo
2014/05/19 15:07:38
Looks good.
|
| + """Same as test_untiled, but with an empty expectations file.""" |
| + output_json_path = os.path.join(self._output_dir, 'actuals.json') |
| + write_path_dir = self.create_empty_dir( |
| + path=os.path.join(self._output_dir, 'writePath')) |
| + self._generate_skps() |
| + expectations_path = os.path.join(self._expectations_dir, 'empty') |
| + with open(expectations_path, 'w') as fh: |
| + pass |
| + self._run_render_pictures([ |
| + '-r', self._input_skp_dir, |
| + '--readJsonSummaryPath', expectations_path, |
| + '--writePath', write_path_dir, |
| + '--writeJsonSummaryPath', output_json_path]) |
| + expected_summary_dict = { |
| + "header" : EXPECTED_HEADER_CONTENTS, |
| + "actual-results" : { |
| + "red.skp": { |
| + "whole-image": modified_dict( |
| + RED_WHOLEIMAGE, {"comparisonResult" : "no-comparison"}), |
| + }, |
| + "green.skp": { |
| + "whole-image": modified_dict( |
| + GREEN_WHOLEIMAGE, {"comparisonResult" : "no-comparison"}), |
| + } |
| + } |
| + } |
| + self._assert_json_contents(output_json_path, expected_summary_dict) |
| + self._assert_directory_contents( |
| + write_path_dir, ['red_skp.png', 'green_skp.png']) |
| + |
| def test_untiled_writeChecksumBasedFilenames(self): |
| """Same as test_untiled, but with --writeChecksumBasedFilenames.""" |
| output_json_path = os.path.join(self._output_dir, 'actuals.json') |