def test_half_birthday(self): test_date_1 = datetime.datetime(1979, 7, 5) test_date_2 = datetime.datetime(1984, 1, 10) test_date_3 = datetime.datetime(1998, 12, 31) self.assertEqual(half.half_birthday(test_date_1), datetime.datetime(1980, 1, 5)) self.assertEqual(half.half_birthday(test_date_2), datetime.datetime(1984, 7, 10)) self.assertEqual(half.half_birthday(test_date_3), datetime.datetime(1999, 6, 30))
def test_half_birthday(self): birthday = datetime.datetime(2020, 10, 7) expected = datetime.date(2021, 4, 7).isoformat() self.assertEqual(expected, hb.half_birthday(birthday))
def test_half_birthday(self): most_recent_birthday = half_birthday.date(2019, 7, 21) my_half_birthday = half_birthday.date(2020, 1, 19) self.assertEqual(half_birthday.half_birthday(most_recent_birthday), my_half_birthday)
def test_half_birthday(self): birthday = datetime.datetime(2019, 4, 19) my_half_birthday = datetime.datetime(2019, 10, 18, 12) self.assertEquals(half_birthday.half_birthday(birthday), my_half_birthday)
def test_something(self): self.assertEqual(hb.half_birthday(2020, 2, 15), '2020-08-13 00:00:00')
def test_half_birthday(self): test_date = datetime(2020, 12, 31) self.assertEqual("Your half b-day is 2021-07-01 12:00:00", birthday.half_birthday(test_date))
def test_half_birthday(self): self.assertEqual(half.half_birthday(self.date), self.half)
def test_half_birthday(self): birthdate = '2020-01-19' expected_date = '2020-07-19' self.assertEqual(expected_date, hb.half_birthday(birthdate))
def test_half_birthday(self): self.assertEqual( half_birthday.half_birthday(datetime.date(2020, 2, 28)), '2020-08-28')
def test_half_birthday(self): birthday = datetime.datetime(2015, 3, 15) self.assertEqual(datetime.datetime(2015, 9, 15), half_birthday.half_birthday(birthday))
def test_average(self): birthday = datetime.datetime(2020, 6, 22) expected_half = datetime.datetime(2020, 12, 21) self.assertEqual(expected_half, hbd.half_birthday(birthday))
def test_half_birthday(self): self.assertEqual(datetime(2021, 1, 17), half_birthday.half_birthday(2020, 7, 19))