def test_combine(self): article = BeautifulSoup(html_iraqwar) evs = wikipediaprocess._string_blocks_to_events(wikipediaprocess._html_to_string_blocks(article)) self.p(evs) self.assertEqual(len(evs), 5)
def test_three(self): article = BeautifulSoup(html_particlephysics) evs = wikipediaprocess._string_blocks_to_events(wikipediaprocess._html_to_string_blocks(article)) self.p(evs) self.assertEqual(len(evs), 31)
def test_four(self): article = BeautifulSoup(html_modernhist) evs = wikipediaprocess._string_blocks_to_events(wikipediaprocess._html_to_string_blocks(article)) self.p(evs) self.assertEqual(len(evs), 122)
def test_three(self): html = BeautifulSoup(htmlthree) strings = wikipediaprocess._html_to_string_blocks(html) self.assertEqual(strings, stringblocksthree)