MCPcopy
hub / github.com/aosabook/500lines / crawl

Method crawl

crawler/code/test.py:115–122  ·  view source on GitHub ↗
(self, urls=None, *args, **kwargs)

Source from the content-addressed store, hash-verified

113 self.assertEqual(getattr(stat, name), value, msg)
114
115 def crawl(self, urls=None, *args, **kwargs):
116 if self.crawler:
117 self.crawler.close()
118 if urls is None:
119 urls = [self.app_url]
120 self.crawler = crawling.Crawler(urls, *args, loop=self.loop, **kwargs)
121 self.addCleanup(self.crawler.close)
122 self.loop.run_until_complete(self.crawler.crawl())
123
124 def test_link(self):
125 # "/" links to foo, which is missing.

Callers 12

test_linkMethod · 0.95
test_link_cycleMethod · 0.95
test_prohibited_hostMethod · 0.95
test_redirectMethod · 0.95
test_redirect_cycleMethod · 0.95
test_redirect_joinMethod · 0.95
test_max_tasksMethod · 0.95
test_max_triesMethod · 0.95
test_charsetMethod · 0.95
test_content_typeMethod · 0.95
test_non_htmlMethod · 0.95
test_non_httpMethod · 0.95

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected