Commit dce9b629 authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa Committed by Commit Bot

tests: Use the right clean up method name for some test cases.

In Python land, the method run once a test method runs is called tearDown(),
not cleanUp(). In other words, the existing methods were never called and we
were always leaving lots of "gstools_test*" directories in /tmp.

Change-Id: Ib1de95c7ba92922b98571780f389237de0dcb253
Reviewed-on: https://chromium-review.googlesource.com/753383
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: 's avatarAaron Gable <agable@chromium.org>
parent eba83470
......@@ -91,7 +91,7 @@ class GstoolsUnitTests(unittest.TestCase):
self.base_path = os.path.join(self.temp_dir, 'test_files')
shutil.copytree(os.path.join(TEST_DIR, 'gstools'), self.base_path)
def cleanUp(self):
def tearDown(self):
shutil.rmtree(self.temp_dir)
def test_validate_tar_file(self):
......@@ -198,7 +198,7 @@ class DownloadTests(unittest.TestCase):
self.lorem_ipsum_sha1 = '7871c8e24da15bad8b0be2c36edc9dc77e37727f'
self.maxDiff = None
def cleanUp(self):
def tearDown(self):
shutil.rmtree(self.temp_dir)
def test_enumerate_files_non_recursive(self):
......
......@@ -42,7 +42,7 @@ class UploadTests(unittest.TestCase):
self.lorem_ipsum = os.path.join(self.base_path, 'lorem_ipsum.txt')
self.lorem_ipsum_sha1 = '7871c8e24da15bad8b0be2c36edc9dc77e37727f'
def cleanUp(self):
def tearDown(self):
shutil.rmtree(self.temp_dir)
sys.stdin = sys.__stdin__
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment