MCPcopy Index your code
hub / github.com/clips/pattern / test_crawler_breadth

Method test_crawler_breadth

test/test_web.py:1003–1011  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1001 print "pattern.web.Crawler.delay"
1002
1003 def test_crawler_breadth(self):
1004 # Assert BREADTH cross-domain preference.
1005 v = web.Crawler(links=["http://www.clips.ua.ac.be/"], delay=10)
1006 while len(v.visited) < 4:
1007 v.crawl(throttle=0.1, cached=False, method=web.BREADTH)
1008 self.assertTrue(v.history.keys()[0] != v.history.keys()[1])
1009 self.assertTrue(v.history.keys()[0] != v.history.keys()[2])
1010 self.assertTrue(v.history.keys()[1] != v.history.keys()[2])
1011 print "pattern.web.Crawler.crawl(method=BREADTH)"
1012
1013#---------------------------------------------------------------------------------------------------
1014

Callers

nothing calls this directly

Calls 3

crawlMethod · 0.95
lenFunction · 0.85
keysMethod · 0.45

Tested by

no test coverage detected