Example #1
0
 def test_parse_birth_ad(self):
     """Verify that parse_birth() parses a single AD Birth line correctly."""
     birth_line = "*[[1862]] – [[Matthew Nathan|Sir Matthew Nathan]], British Governor of [[Queensland]] (d. 1939)"
     (actual_year, actual_name) = wikiparse.parse_birth(birth_line)
     self.assertEqual("1862", actual_year, "Wrong year returned")
     self.assertEqual("[[Matthew Nathan|Sir Matthew Nathan]], British Governor of [[Queensland]] (d. 1939)", actual_name,
                      "Wrong name returned")
Example #2
0
 def test_parse_birth_bc(self):
     """Verify that parse_birth() parses a single BC Birth line correctly."""
     birth_line = "*[[106 BC]] – [[Cicero]], Roman statesman and philosopher (d. 43 BC)"
     (actual_year, actual_name) = wikiparse.parse_birth(birth_line)
     self.assertEqual("106 BC", actual_year, "Wrong year returned")
     self.assertEqual("[[Cicero]], Roman statesman and philosopher (d. 43 BC)", actual_name, "Wrong name returned")