From 9346ca997d723cbfedf383eb78db2f62552f8a7c Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Thu, 11 Oct 2012 15:17:01 +0200 Subject: [PATCH] Fix empty image list test. --- tests/test_comics.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/test_comics.py b/tests/test_comics.py index 7b3f66dee..2ee17d004 100644 --- a/tests/test_comics.py +++ b/tests/test_comics.py @@ -22,11 +22,12 @@ class _ComicTester(TestCase): scraperobj = self.scraperclass() num = empty = 0 for strip in islice(scraperobj.getAllStrips(), 0, 5): - images = strip.getImages() - if len(images) == 0: - empty += 1 - for image in images: + images = 0 + for image in strip.getImages(): + images += 1 self.save(image) + if not images: + empty += 1 num += 1 self.check(num >= 4, 'traversal failed after %d strips.' % num) self.check(empty <= 1, 'failed to find images on %d pages.' % empty)