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

Unified Diff: gm/rebaseline_server/imagediffdb.py

Issue 397103003: combine base_unittest.py modules from gm and tools (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: pylint 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
Index: gm/rebaseline_server/imagediffdb.py
diff --git a/gm/rebaseline_server/imagediffdb.py b/gm/rebaseline_server/imagediffdb.py
index f6071f9700661abb3d405881e5eba751a2ede7d0..89f9fef319a4045909553c7c840bbc19fb1004f0 100644
--- a/gm/rebaseline_server/imagediffdb.py
+++ b/gm/rebaseline_server/imagediffdb.py
@@ -9,21 +9,20 @@ found in the LICENSE file.
Calulate differences between image pairs, and store them in a database.
"""
+# System-level imports
import contextlib
import json
import logging
import os
import re
import shutil
-import sys
import tempfile
import urllib
-# Set the PYTHONPATH to include the tools directory.
-sys.path.append(
- os.path.join(
- os.path.dirname(os.path.realpath(__file__)), os.pardir, os.pardir,
- 'tools'))
+# Must fix up PYTHONPATH before importing from within Skia
+import fix_pythonpath # pylint: disable=W0611
+
+# Imports from within Skia
import find_run_binary
SKPDIFF_BINARY = find_run_binary.find_path_to_program('skpdiff')

Powered by Google App Engine
This is Rietveld 408576698