예제 #1
0
 def test_next_gem(self):
     page = wiki.open_page("Montreal")
     x = wiki.gemify_page(page)
     
     self.assertEqual(None, wiki.next_gem(0, x))
     first = x[0]
     self.assertEqual(first, wiki.next_gem(200, x))
     self.assertNotEqual(first, x[0])
     first = x[0]
     self.assertEqual(first, wiki.next_gem(200, x))
     
     while len(x) != 0:
         print (wiki.next_gem(600, x))
예제 #2
0
 def test_gemify_page(self):
     page = wiki.open_page("Montreal")
     x = wiki.gemify_page(page)
     print(x)
예제 #3
0
 def test_open_page(self):
     page = wiki.open_page("Montreal")
     print(page.url)
     print(page.summary)