def test_year_range_miner_range(self): self.assertEqual( mine_date(self.text_dynasty)[0], ['1368-01-01', '1644-01-01'])
def test_year_miner_bce_units(self): self.assertEqual(mine_date(self.text_bce_three)[0], '-0160-01-01')
def test_year_miner_bce(self): self.assertEqual(mine_date(self.text_bce)[0], '-0011-01-01')
def test_mine_date_text(self): self.assertEqual(mine_date(self.text_year)[0], '2003-01-01')
def test_year_miner_ce(self): self.assertEqual(mine_date(self.text_ce)[0], '1950-01-01')
def test_mine_date_multipe(self): self.assertEqual(mine_date(self.text_multiple_dates), ['2003-01-01', '2013-01-01']) self.assertEqual(mine_date(self.text_multiple_dates_2), ['1981-01-01', '2003-01-01', '2013-01-01'])
def test_mine_date_none_resource(self): self.assertIsNone(mine_date(self.text_less_resource))
def test_year_range_miner_range(self): self.assertEqual(mine_date(self.text_dynasty)[0], ['1368-01-01', '1644-01-01'])
def test_unicode_errors(self): self.assertEqual(mine_date(self.text_unicode)[0], '2010-01-01')
def test_exact_dates(self): self.assertEqual(mine_date(self.text_exact_dates), ['1971-01-01', '1974-01-01', '1933-01-01'])
def test_mine_date_none(self): self.assertIsNone(mine_date(self.text_plain))