Example #1
0
	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)
Example #2
0
	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)
Example #3
0
	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)
Example #4
0
	def test_three(self):
		html = BeautifulSoup(htmlthree)
		strings = wikipediaprocess._html_to_string_blocks(html)
		self.assertEqual(strings, stringblocksthree)