Fix empty image list test.
This commit is contained in:
parent
7b2c839f03
commit
9346ca997d
1 changed files with 5 additions and 4 deletions
|
@ -22,11 +22,12 @@ class _ComicTester(TestCase):
|
||||||
scraperobj = self.scraperclass()
|
scraperobj = self.scraperclass()
|
||||||
num = empty = 0
|
num = empty = 0
|
||||||
for strip in islice(scraperobj.getAllStrips(), 0, 5):
|
for strip in islice(scraperobj.getAllStrips(), 0, 5):
|
||||||
images = strip.getImages()
|
images = 0
|
||||||
if len(images) == 0:
|
for image in strip.getImages():
|
||||||
empty += 1
|
images += 1
|
||||||
for image in images:
|
|
||||||
self.save(image)
|
self.save(image)
|
||||||
|
if not images:
|
||||||
|
empty += 1
|
||||||
num += 1
|
num += 1
|
||||||
self.check(num >= 4, 'traversal failed after %d strips.' % num)
|
self.check(num >= 4, 'traversal failed after %d strips.' % num)
|
||||||
self.check(empty <= 1, 'failed to find images on %d pages.' % empty)
|
self.check(empty <= 1, 'failed to find images on %d pages.' % empty)
|
||||||
|
|
Loading…
Reference in a new issue