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

Method test_wikipedia_all

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

Source from the content-addressed store, hash-verified

628 print "pattern.web.Wikipedia.list()"
629
630 def test_wikipedia_all(self):
631 # Assert WikipediaArticle.all(), an iterator over WikipediaArticle objects.
632 source, license, Engine = self.api["Wikipedia"]
633 v = Engine(license).all(start="a", count=1)
634 v = [v.next() for i in range(1)]
635 self.assertTrue(len(v) == 1)
636 self.assertTrue(isinstance(v[0], web.WikipediaArticle))
637 self.assertTrue(v[0].title.lower().startswith("a"))
638 print "pattern.web.Wikipedia.all()"
639
640 def test_wikipedia_article(self):
641 source, license, Engine = self.api["Wikipedia"]

Callers

nothing calls this directly

Calls 3

lenFunction · 0.85
allMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected