releasetools: Add a common base class for unittests.
All the releasetools unittests extend the common base class of test_utils.ReleaseToolsTestCase. Define tearDown() in the base class to do the clean-up works. Test: `pylint --rcfile=pylintrc test_*.py` Test: `python -m unittest discover .` Change-Id: I51775d964ef032dcdf3bb89c55e1a31371cde708
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
|
||||
import os
|
||||
import os.path
|
||||
import unittest
|
||||
import zipfile
|
||||
|
||||
import common
|
||||
@@ -30,14 +29,11 @@ from rangelib import RangeSet
|
||||
OPTIONS = common.OPTIONS
|
||||
|
||||
|
||||
class AddImagesToTargetFilesTest(unittest.TestCase):
|
||||
class AddImagesToTargetFilesTest(test_utils.ReleaseToolsTestCase):
|
||||
|
||||
def setUp(self):
|
||||
OPTIONS.input_tmp = common.MakeTempDir()
|
||||
|
||||
def tearDown(self):
|
||||
common.Cleanup()
|
||||
|
||||
def _verifyCareMap(self, expected, file_name):
|
||||
"""Parses the care_map.pb; and checks the content in plain text."""
|
||||
text_file = common.MakeTempFile(prefix="caremap-", suffix=".txt")
|
||||
|
Reference in New Issue
Block a user