Esempio n. 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))
Esempio n. 2
0
 def test_gemify_page(self):
     page = wiki.open_page("Montreal")
     x = wiki.gemify_page(page)
     print(x)