# Path: hamster_lib/helpers/time.py
# def get_day_end(config):
# def end_day_to_datetime(end_day, config):
# def extract_time_info(text):
#     def get_time(time, seconds=None):
#     def get_date(date):
#     def date_time_from_groupdict(groupdict):
# def complete_timeframe(timeframe, config, partial=False):
#     def complete_start_date(date):
#     def complete_start_time(time, day_start):
#     def complete_start(date, time, config):
#     def complete_end_date(date):
#     def complete_end(date, time, config):
# def parse_time(time):
# def validate_start_end_range(range_tuple):
# 
# Path: hamster_lib/helpers/time.py
# def get_day_end(config):
# def end_day_to_datetime(end_day, config):
# def extract_time_info(text):
#     def get_time(time, seconds=None):
#     def get_date(date):
#     def date_time_from_groupdict(groupdict):
# def complete_timeframe(timeframe, config, partial=False):
#     def complete_start_date(date):
#     def complete_start_time(time, day_start):
#     def complete_start(date, time, config):
#     def complete_end_date(date):
#     def complete_end(date, time, config):
# def parse_time(time):
# def validate_start_end_range(range_tuple):


import datetime
import pytest
from freezegun import freeze_time
from hamster_lib.helpers import time as time_helpers
from hamster_lib.helpers.time import TimeFrame
# -*- encoding: utf-8 -*-

from __future__ import absolute_import, unicode_literals




class TestGetDayEnd(object):
    @pytest.mark.parametrize(('day_start', 'expectation'), [
        (datetime.time(0, 0, 0), datetime.time(23, 59, 59)),
        (datetime.time(5, 30, 0), datetime.time(5, 29, 59)),
        (datetime.time(23, 59, 59), datetime.time(23, 59, 58)),
        (datetime.time(14, 44, 23), datetime.time(14, 44, 22)),
    ])
    def test_various_day_start_times(self, base_config, day_start, expectation):
        """Ensure that resulting end times match our expectation given ``day_start``-"""
        base_config['day_start'] = day_start

# Path: hamster_lib/helpers/time.py
# def get_day_end(config):
# def end_day_to_datetime(end_day, config):
# def extract_time_info(text):
#     def get_time(time, seconds=None):
#     def get_date(date):
#     def date_time_from_groupdict(groupdict):
# def complete_timeframe(timeframe, config, partial=False):
#     def complete_start_date(date):
#     def complete_start_time(time, day_start):
#     def complete_start(date, time, config):
#     def complete_end_date(date):
#     def complete_end(date, time, config):
# def parse_time(time):
# def validate_start_end_range(range_tuple):
# 
# Path: hamster_lib/helpers/time.py
# def get_day_end(config):
# def end_day_to_datetime(end_day, config):
# def extract_time_info(text):
#     def get_time(time, seconds=None):
#     def get_date(date):
#     def date_time_from_groupdict(groupdict):
# def complete_timeframe(timeframe, config, partial=False):
#     def complete_start_date(date):
#     def complete_start_time(time, day_start):
#     def complete_start(date, time, config):
#     def complete_end_date(date):
#     def complete_end(date, time, config):
# def parse_time(time):
# def validate_start_end_range(range_tuple):


# Path: tests/helpers/test_time.py
import datetime
import pytest
from freezegun import freeze_time
from hamster_lib.helpers import time as time_helpers
from hamster_lib.helpers.time import TimeFrame

# -*- encoding: utf-8 -*-

from __future__ import absolute_import, unicode_literals




class TestGetDayEnd(object):
    @pytest.mark.parametrize(('day_start', 'expectation'), [
        (datetime.time(0, 0, 0), datetime.time(23, 59, 59)),
        (datetime.time(5, 30, 0), datetime.time(5, 29, 59)),
        (datetime.time(23, 59, 59), datetime.time(23, 59, 58)),
        (datetime.time(14, 44, 23), datetime.time(14, 44, 22)),
    ])
    def test_various_day_start_times(self, base_config, day_start, expectation):
        """Ensure that resulting end times match our expectation given ``day_start``-"""
        base_config['day_start'] = day_start

        assert time_helpers.get_day_end(base_config) == expectation