Fix comic test with zero strip images.
This commit is contained in:
parent
17fe58b864
commit
ea4a59318f
1 changed files with 19 additions and 14 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue