# 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
# -*- coding: utf-8 -*-

"""Fixtures needed to test helper submodule."""

from __future__ import absolute_import, unicode_literals




@pytest.fixture
def filename():
    """Provide a filename string."""
    return fauxfactory.gen_utf8()


@pytest.fixture
def filepath(tmpdir, filename):
    """Provide a fully qualified pathame within our tmp-dir."""
    return os.path.join(tmpdir.strpath, filename)


@pytest.fixture
def appdirs(mocker, tmpdir):
    """Provide mocked version specific user dirs using a tmpdir."""
    def ensure_directory_exists(directory):
        if not os.path.lexists(directory):
            os.makedirs(directory)
        return directory


# 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

# -*- coding: utf-8 -*-

"""Fixtures needed to test helper submodule."""

from __future__ import absolute_import, unicode_literals




@pytest.fixture
def filename():
    """Provide a filename string."""
    return fauxfactory.gen_utf8()


@pytest.fixture
def filepath(tmpdir, filename):
    """Provide a fully qualified pathame within our tmp-dir."""
    return os.path.join(tmpdir.strpath, filename)


@pytest.fixture
def appdirs(mocker, tmpdir):
    """Provide mocked version specific user dirs using a tmpdir."""
    def ensure_directory_exists(directory):
        if not os.path.lexists(directory):
            os.makedirs(directory)
        return directory


    config_helpers.HamsterAppDirs.user_config_dir = ensure_directory_exists(os.path.join(