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

Unified Diff: gm/rebaseline_server/imagediffdb_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/imagediffdb_test.py
diff --git a/gm/rebaseline_server/imagediffdb_test.py b/gm/rebaseline_server/imagediffdb_test.py
index 4fc8c66f2ba534fc7e50bdf2dc716fbaf5a2e2a5..186b2f132419344619138806f12e6ce63e8e31fc 100755
--- a/gm/rebaseline_server/imagediffdb_test.py
+++ b/gm/rebaseline_server/imagediffdb_test.py
@@ -10,7 +10,6 @@ Test imagediffdb.py
"""
# System-level imports
-import logging
import shutil
import tempfile
import unittest
@@ -26,11 +25,11 @@ IMG_URL_BASE = ('http://chromium-skia-gm.commondatastorage.googleapis.com/gm/'
class ImageDiffDbTest(unittest.TestCase):
def setUp(self):
- self._temp_dir = tempfile.mkdtemp()
+ self.temp_dir = tempfile.mkdtemp()
self.maxDiff = None
def tearDown(self):
- shutil.rmtree(self._temp_dir)
+ shutil.rmtree(self.temp_dir)
def shortDescription(self):
"""Tell unittest framework to not print docstrings for test cases."""
@@ -38,6 +37,7 @@ class ImageDiffDbTest(unittest.TestCase):
def test_sanitize_locator(self):
"""Test _sanitize_locator()."""
+ # pylint: disable=W0212
self.assertEqual(imagediffdb._sanitize_locator('simple'), 'simple')
self.assertEqual(imagediffdb._sanitize_locator(1234), '1234')
self.assertEqual(imagediffdb._sanitize_locator('one/two'), 'one_two')
@@ -76,9 +76,9 @@ class ImageDiffDbTest(unittest.TestCase):
]
# Add all image pairs to the database
- db = imagediffdb.ImageDiffDB(self._temp_dir)
+ db = imagediffdb.ImageDiffDB(self.temp_dir)
for selftest in selftests:
- retval = db.add_image_pair(
+ db.add_image_pair(
expected_image_locator=selftest[0], expected_image_url=selftest[1],
actual_image_locator=selftest[2], actual_image_url=selftest[3])

Powered by Google App Engine
This is Rietveld 408576698