def test_parse_24hr_time_str_to_hour_min_excepts_on_invalid_times(self): for time_str, hr24, min in _some_invalid_24hr_clk_times(): with self.assertRaises(InvalidTime, msg=time_str) as e: TimeOfDay.parse_24hr_time_str_to_hour_min(time_str)
def test_parse_24hr_time_str_to_hour_min_works_for_valid_times(self): for time_str, hr24, min in _all_valid_24hr_clk_times(): h, m = TimeOfDay.parse_24hr_time_str_to_hour_min(time_str) self.assertEqual(hr24, h) self.assertEqual(min, m)