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

Unified Diff: tools/tests/render_pictures_test.py

Issue 397103003: combine base_unittest.py modules from gm and tools (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: everything but pylint cleanup Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« gm/rebaseline_server/base_unittest.py ('K') | « tools/tests/fix_pythonpath.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/tests/render_pictures_test.py
diff --git a/tools/tests/render_pictures_test.py b/tools/tests/render_pictures_test.py
index 8feef673186576ca0315ec75f8b0ef0532b26fbd..c28166cedee86f39fb22cd7c8601a4cab149fe5c 100755
--- a/tools/tests/render_pictures_test.py
+++ b/tools/tests/render_pictures_test.py
@@ -16,8 +16,12 @@ import os
import shutil
import tempfile
+# Must fix up PYTHONPATH before importing from within Skia
+import fix_pythonpath # pylint: disable=W0611
+
# Imports from within Skia
import base_unittest
+import find_run_binary
# Maximum length of text diffs to show when tests fail
MAX_DIFF_LENGTH = 30000
@@ -553,10 +557,9 @@ class RenderPicturesTest(base_unittest.TestCase):
'bitmap-64bitMD5_10673669813016809363.png'])
def _run_render_pictures(self, args):
- binary = self.find_path_to_program('render_pictures')
- return self.run_command([binary,
- '--config', '8888',
- ] + args)
+ binary = find_run_binary.find_path_to_program('render_pictures')
+ return find_run_binary.run_command(
+ [binary, '--config', '8888'] + args)
def _create_expectations(self, missing_some_images=False,
rel_path='expectations.json'):
@@ -614,15 +617,16 @@ class RenderPicturesTest(base_unittest.TestCase):
width: Width of canvas to create.
height: Height of canvas to create.
"""
- binary = self.find_path_to_program('skpmaker')
- return self.run_command([binary,
- '--red', str(red),
- '--green', str(green),
- '--blue', str(blue),
- '--width', str(width),
- '--height', str(height),
- '--writePath', str(output_path),
- ])
+ binary = find_run_binary.find_path_to_program('skpmaker')
+ return find_run_binary.run_command([
+ binary,
+ '--red', str(red),
+ '--green', str(green),
+ '--blue', str(blue),
+ '--width', str(width),
+ '--height', str(height),
+ '--writePath', str(output_path),
+ ])
def _assert_directory_contents(self, dir_path, expected_filenames):
"""Asserts that files found in a dir are identical to expected_filenames.
« gm/rebaseline_server/base_unittest.py ('K') | « tools/tests/fix_pythonpath.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698