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

Side by Side Diff: gm/rebaseline_server/base_unittest.py

Issue 424263005: teach rebaseline_server to generate diffs of rendered SKPs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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 unified diff | Download patch
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 """ 3 """
4 Copyright 2014 Google Inc. 4 Copyright 2014 Google Inc.
5 5
6 Use of this source code is governed by a BSD-style license that can be 6 Use of this source code is governed by a BSD-style license that can be
7 found in the LICENSE file. 7 found in the LICENSE file.
8 8
9 A wrapper around the standard Python unittest library, adding features we need 9 A wrapper around the standard Python unittest library, adding features we need
10 for various unittests within this directory. 10 for various unittests within this directory.
11 """ 11 """
12 12
13 # System-level imports. 13 # System-level imports.
14 import os 14 import os
15 import sys 15 import sys
16 16
17 PARENT_DIR = os.path.abspath(os.path.dirname(__file__)) 17 PARENT_DIR = os.path.abspath(os.path.dirname(__file__))
18 TRUNK_DIR = os.path.abspath(os.path.join(PARENT_DIR, os.pardir, os.pardir)) 18 TRUNK_DIR = os.path.abspath(os.path.join(PARENT_DIR, os.pardir, os.pardir))
19 19
20 # Import the superclass base_unittest module from the tools dir. 20 # Import the superclass base_unittest module from the tools dir.
21 TOOLS_DIR = os.path.join(TRUNK_DIR, 'tools') 21 TOOLS_DIR = os.path.join(TRUNK_DIR, 'tools')
22 if TOOLS_DIR not in sys.path: 22 if TOOLS_DIR not in sys.path:
23 sys.path.append(TOOLS_DIR) 23 sys.path.append(TOOLS_DIR)
24 sys.path.insert(0, TOOLS_DIR) # EPOGER: CLEAN THIS UP! The import of tests.bas e_unittest fails unless I do this.
epoger 2014/07/31 15:18:31 Throughout this patchset, there are these "EPOGER"
24 import tests.base_unittest as superclass_module 25 import tests.base_unittest as superclass_module
25 26
26 27
27 class TestCase(superclass_module.TestCase): 28 class TestCase(superclass_module.TestCase):
28 29
29 def __init__(self, *args, **kwargs): 30 def __init__(self, *args, **kwargs):
30 super(TestCase, self).__init__(*args, **kwargs) 31 super(TestCase, self).__init__(*args, **kwargs)
31 # Some of the tests within this package want their output validated, 32 # Some of the tests within this package want their output validated,
32 # so we declare where the expected and actual output will be. 33 # so we declare where the expected and actual output will be.
33 self._testdata_dir = os.path.join(PARENT_DIR, 'testdata') 34 self._testdata_dir = os.path.join(PARENT_DIR, 'testdata')
34 35
35 def main(*args, **kwargs): 36 def main(*args, **kwargs):
36 superclass_module.main(*args, **kwargs) 37 superclass_module.main(*args, **kwargs)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698