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

Method assertStat

crawler/code/test.py:109–113  ·  view source on GitHub ↗
(self, stat_index=0, **kwargs)

Source from the content-addressed store, hash-verified

107 n, len(self.crawler.done)))
108
109 def assertStat(self, stat_index=0, **kwargs):
110 stat = self.crawler.done[stat_index]
111 for name, value in kwargs.items():
112 msg = '{}.{} not equal to {!r}'.format(stat, name, value)
113 self.assertEqual(getattr(stat, name), value, msg)
114
115 def crawl(self, urls=None, *args, **kwargs):
116 if self.crawler:

Callers 11

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_triesMethod · 0.95
test_charsetMethod · 0.95
test_content_typeMethod · 0.95
test_non_htmlMethod · 0.95
test_non_httpMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected