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

Unified Diff: gm/rebaseline_server/compare_to_expectations_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: 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/compare_to_expectations_test.py
diff --git a/gm/rebaseline_server/compare_to_expectations_test.py b/gm/rebaseline_server/compare_to_expectations_test.py
index d2b2dd60ee9c5dc09912a68a968c412d724e88be..2997cde67f67d83c0c4da4cd993c6ddaaea08e33 100755
--- a/gm/rebaseline_server/compare_to_expectations_test.py
+++ b/gm/rebaseline_server/compare_to_expectations_test.py
@@ -10,9 +10,9 @@ Test compare_to_expectations.py
TODO(epoger): Create a command to update the expected results (in
self._output_dir_expected) when appropriate. For now, you should:
-1. examine the results in self._output_dir_actual and make sure they are ok
+1. examine the results in self.output_dir_actual and make sure they are ok
2. rm -rf self._output_dir_expected
-3. mv self._output_dir_actual self._output_dir_expected
+3. mv self.output_dir_actual self._output_dir_expected
Although, if you're using an SVN checkout, this will blow away .svn directories
within self._output_dir_expected, which wouldn't be good...
@@ -32,17 +32,17 @@ class CompareToExpectationsTest(base_unittest.TestCase):
def test_gm(self):
"""Process results of a GM run with the ExpectationComparisons object."""
- image_diff_db = imagediffdb.ImageDiffDB(storage_root=self._temp_dir)
+ image_diff_db = imagediffdb.ImageDiffDB(storage_root=self.temp_dir)
results_obj = compare_to_expectations.ExpectationComparisons(
image_diff_db=image_diff_db,
- actuals_root=os.path.join(self._input_dir, 'gm-actuals'),
- expected_root=os.path.join(self._input_dir, 'gm-expectations'),
+ actuals_root=os.path.join(self.input_dir, 'gm-actuals'),
+ expected_root=os.path.join(self.input_dir, 'gm-expectations'),
diff_base_url='/static/generated-images')
results_obj.get_timestamp = mock_get_timestamp
gm_json.WriteToFile(
results_obj.get_packaged_results_of_type(
results.KEY__HEADER__RESULTS_ALL),
- os.path.join(self._output_dir_actual, 'gm.json'))
+ os.path.join(self.output_dir_actual, 'gm.json'))
def mock_get_timestamp():

Powered by Google App Engine
This is Rietveld 408576698