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

Method test_wikipedia_list

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

Source from the content-addressed store, hash-verified

618 self._test_search_image_size("Flickr", *self.api["Flickr"])
619
620 def test_wikipedia_list(self):
621 # Assert WikipediaArticle.list(), an iterator over all article titles.
622 source, license, Engine = self.api["Wikipedia"]
623 v = Engine(license).list(start="a", count=1)
624 v = [v.next() for i in range(2)]
625 self.assertTrue(len(v) == 2)
626 self.assertTrue(v[0].lower().startswith("a"))
627 self.assertTrue(v[1].lower().startswith("a"))
628 print "pattern.web.Wikipedia.list()"
629
630 def test_wikipedia_all(self):
631 # Assert WikipediaArticle.all(), an iterator over WikipediaArticle objects.

Callers

nothing calls this directly

Calls 3

lenFunction · 0.85
listMethod · 0.80
nextMethod · 0.45

Tested by

no test coverage detected