mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-16 22:10:26 +00:00
Fail on internal errors in LinkCheckTest.direct()
Copied from LinkCheckTest.file_test().
This commit is contained in:
parent
054a583b79
commit
a7b9ac42be
1 changed files with 4 additions and 1 deletions
|
|
@ -277,11 +277,14 @@ class LinkCheckTest(TestBase):
|
|||
url_data = get_url_from(url, url_reclevel, aggregate, url_encoding=url_encoding)
|
||||
aggregate.urlqueue.put(url_data)
|
||||
linkcheck.director.check_urls(aggregate)
|
||||
diff = aggregate.config["logger"].diff
|
||||
logger = aggregate.config["logger"]
|
||||
diff = logger.diff
|
||||
if diff:
|
||||
d = ["Differences found testing %s" % url]
|
||||
d.extend(x.rstrip() for x in diff[2:])
|
||||
self.fail(os.linesep.join(d))
|
||||
if logger.stats.internal_errors:
|
||||
self.fail("%d internal errors occurred!" % logger.stats.internal_errors)
|
||||
|
||||
|
||||
class MailTest(LinkCheckTest):
|
||||
|
|
|
|||
Loading…
Reference in a new issue