Initialize tmpdir.

This commit is contained in:
Bastian Kleineidam 2013-06-28 21:34:01 +02:00
parent 27c90f07a5
commit 75bbf10d78

View file

@ -39,9 +39,12 @@ class _ComicTester(TestCase):
self.url = self.scraperclass.starter()
# create a temporary directory for images
self.tmpdir = tempfile.mkdtemp()
else:
self.tmpdir = None
def tearDown(self):
shutil.rmtree(self.tmpdir)
if self.tmpdir is not None:
shutil.rmtree(self.tmpdir)
def get_saved_images(self):
"""Get saved images."""