def test_yyyymmdd_to_dt_error(self): with self.assertRaises(ValueError): pyho.yyyymmdd_to_dt(20161232)
def test_yyyymmdd_to_dt(self): self.assertEqual(pyho.yyyymmdd_to_dt(20151225), datetime.date(2015, 12, 25))