# Path: hamster_lib/helpers/config_helpers.py
# class HamsterAppDirs(appdirs.AppDirs):
#     def __init__(self, *args, **kwargs):
#     def user_data_dir(self):
#     def site_data_dir(self):
#     def user_config_dir(self):
#     def site_config_dir(self):
#     def user_cache_dir(self):
#     def user_log_dir(self):
#     def _ensure_directory_exists(self, directory):
# def get_config_path(appdirs=DEFAULT_APPDIRS, file_name=DEFAULT_CONFIG_FILENAME):
# def write_config_file(config_instance, appdirs=DEFAULT_APPDIRS,
#         file_name=DEFAULT_CONFIG_FILENAME):
# def load_config_file(appdirs=DEFAULT_APPDIRS, file_name=DEFAULT_CONFIG_FILENAME,
#         fallback_config_instance=None):
# def get_default_backend_config(appdirs):
# def backend_config_to_configparser(config):
#     def get_store():
#     def get_day_start():
#     def get_fact_min_delta():
#     def get_tmpfile_path():
#     def get_db_engine():
#     def get_db_path():
#     def get_db_host():
#     def get_db_port():
#     def get_db_name():
#     def get_db_user():
#     def get_db_password():
# def configparser_to_backend_config(cp_instance):
#     def get_store():
#     def get_day_start():
#     def get_fact_min_delta():
#     def get_tmpfile_path():
#     def get_db_engine():
#     def get_db_path():
#     def get_db_host():
#     def get_db_port():
#     def get_db_name():
#     def get_db_user():
#     def get_db_password():
# DEFAULT_APP_NAME = 'projecthamster'
# DEFAULT_APPDIRS = HamsterAppDirs(DEFAULT_APP_NAME)
# DEFAULT_CONFIG_FILENAME = '{}.conf'.format(DEFAULT_APPDIRS.appname)
# 
# 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 codecs
import datetime
import os
import fauxfactory
import pytest
from configparser import ConfigParser
from hamster_lib.helpers import config_helpers
from hamster_lib.helpers.time import TimeFrame
from six import text_type
        'tmpfile_path': text_type('/tmp'),
        'db_engine': text_type('sqlite'),
        'db_path': text_type('/tmp/hamster.db'),
        'db_host': text_type('www.example.com'),
        'db_port': 22,
        'db_name': text_type('hamster'),
        'db_user': text_type('hamster'),
        'db_password': text_type('hamster'),
    }

    return config, expectation


@pytest.fixture
def config_instance(request):
    """A dummy instance of ``ConfigParser``."""
    return ConfigParser()


@pytest.fixture
def config_file(backend_config, appdirs):
    """Provide a config file stored under our fake config dir."""
    with codecs.open(os.path.join(appdirs.user_config_dir, 'config.conf'),
            'w', encoding='utf-8') as fobj:
        config_helpers.backend_config_to_configparser(backend_config).write(fobj)
        config_instance.write(fobj)


@pytest.fixture(params=[
    ('foobar', {

# Path: hamster_lib/helpers/config_helpers.py
# class HamsterAppDirs(appdirs.AppDirs):
#     def __init__(self, *args, **kwargs):
#     def user_data_dir(self):
#     def site_data_dir(self):
#     def user_config_dir(self):
#     def site_config_dir(self):
#     def user_cache_dir(self):
#     def user_log_dir(self):
#     def _ensure_directory_exists(self, directory):
# def get_config_path(appdirs=DEFAULT_APPDIRS, file_name=DEFAULT_CONFIG_FILENAME):
# def write_config_file(config_instance, appdirs=DEFAULT_APPDIRS,
#         file_name=DEFAULT_CONFIG_FILENAME):
# def load_config_file(appdirs=DEFAULT_APPDIRS, file_name=DEFAULT_CONFIG_FILENAME,
#         fallback_config_instance=None):
# def get_default_backend_config(appdirs):
# def backend_config_to_configparser(config):
#     def get_store():
#     def get_day_start():
#     def get_fact_min_delta():
#     def get_tmpfile_path():
#     def get_db_engine():
#     def get_db_path():
#     def get_db_host():
#     def get_db_port():
#     def get_db_name():
#     def get_db_user():
#     def get_db_password():
# def configparser_to_backend_config(cp_instance):
#     def get_store():
#     def get_day_start():
#     def get_fact_min_delta():
#     def get_tmpfile_path():
#     def get_db_engine():
#     def get_db_path():
#     def get_db_host():
#     def get_db_port():
#     def get_db_name():
#     def get_db_user():
#     def get_db_password():
# DEFAULT_APP_NAME = 'projecthamster'
# DEFAULT_APPDIRS = HamsterAppDirs(DEFAULT_APP_NAME)
# DEFAULT_CONFIG_FILENAME = '{}.conf'.format(DEFAULT_APPDIRS.appname)
# 
# 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/conftest.py
import codecs
import datetime
import os
import fauxfactory
import pytest
from configparser import ConfigParser
from hamster_lib.helpers import config_helpers
from hamster_lib.helpers.time import TimeFrame
from six import text_type

        'tmpfile_path': text_type('/tmp'),
        'db_engine': text_type('sqlite'),
        'db_path': text_type('/tmp/hamster.db'),
        'db_host': text_type('www.example.com'),
        'db_port': 22,
        'db_name': text_type('hamster'),
        'db_user': text_type('hamster'),
        'db_password': text_type('hamster'),
    }

    return config, expectation


@pytest.fixture
def config_instance(request):
    """A dummy instance of ``ConfigParser``."""
    return ConfigParser()


@pytest.fixture
def config_file(backend_config, appdirs):
    """Provide a config file stored under our fake config dir."""
    with codecs.open(os.path.join(appdirs.user_config_dir, 'config.conf'),
            'w', encoding='utf-8') as fobj:
        config_helpers.backend_config_to_configparser(backend_config).write(fobj)
        config_instance.write(fobj)


@pytest.fixture(params=[
    ('foobar', {

        'timeinfo': TimeFrame(None, None, None, None, None),