Initialize tmpdir.

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

View file

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