Fix comic test with zero strip images.

This commit is contained in:
Bastian Kleineidam 2013-03-19 20:45:45 +01:00
parent 17fe58b864
commit ea4a59318f

View file

@ -75,7 +75,12 @@ class _ComicTester(TestCase):
if num > 0 and self.scraperclass.prevUrlMatchesStripUrl:
self.check_stripurl(strip)
num += 1
if self.scraperclass.prevSearch and not scraperobj.hitFirstStripUrl:
if self.scraperclass.prevSearch:
self.check(num > 0, 'no strips found')
if not scraperobj.hitFirstStripUrl:
self.check_scraperesult(max_strips, num, strip, scraperobj)
def check_scraperesult(self, max_strips, num, strip, scraperobj):
self.check(num >= 4, 'traversal failed after %d strips, check the prevSearch pattern at %s.' % (num, strip.stripUrl))
# Check that exactly or for multiple pages at least 5 images are saved.
# This is different than the image number check above since it checks saved files,