# Path: cutplace/checks.py
# class AbstractCheck(object):
# class IsUniqueCheck(AbstractCheck):
# class DistinctCountCheck(AbstractCheck):
#     def __init__(self, description, rule, available_field_names, location_of_definition=None):
#     def reset(self):
#     def check_row(self, field_name_to_value_map, location):
#     def check_at_end(self, location):
#     def cleanup(self):
#     def __str__(self):
#     def description(self):
#     def rule(self):
#     def location(self):
#     def location_of_rule(self):
#     def field_names(self):
#     def __init__(self, description, rule, available_field_names, location=None):
#     def reset(self):
#     def check_row(self, field_name_to_value_map, location):
#     def __init__(self, description, rule, available_field_names, location=None):
#     def reset(self):
#     def _distinct_count(self):
#     def _eval(self):
#     def check_row(self, field_name_to_value_map, location):
#     def check_at_end(self, location):
#     _COUNT_NAME = "count"
# 
# Path: cutplace/errors.py
# NAME_TO_ASCII_CODE_MAP = {"cr": 13, "ff": 12, "lf": 10, "tab": 9, "vt": 11}
# class Location(object):
# class CutplaceError(Exception):
# class DataError(CutplaceError):
# class InterfaceError(CutplaceError):
# class RangeValueError(DataError):
# class DataFormatError(DataError):
# class FieldValueError(DataError):
# class CheckError(DataError):
#     def __init__(self, file_path, has_column=False, has_cell=False, has_sheet=False):
#     def __copy__(self):
#     def advance_column(self, amount=1):
#     def advance_cell(self, amount=1):
#     def set_cell(self, new_cell):
#     def advance_line(self, amount=1):
#     def advance_sheet(self):
#     def cell(self):
#     def column(self):
#     def line(self):
#     def _get_sheet(self):
#     def _set_sheet(self, new_sheet):
#     def __str__(self):
#     def __repr__(self):
#     def __lt__(self, other):
#     def __eq__(self, other):
# def create_caller_location(modules_to_ignore=None, has_column=False, has_cell=False, has_sheet=False):
#     def __init__(self, message, location=None, see_also_message=None, see_also_location=None, cause=None):
#     def location(self):
#     def message(self):
#     def see_also_message(self):
#     def see_also_location(self):
#     def cause(self):
#     def prepend_message(self, prefix, new_location):
#     def __str__(self):


import logging
import unittest
from cutplace import checks, errors
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
# for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.


_TEST_FIELD_NAMES = "branch_id customer_id first_name surname gender date_of_birth".split()


def _create_field_map(field_names, field_values):
    assert field_names
    assert field_values
    assert len(field_names) == len(field_values)

    return dict(zip(field_names, field_values))


class _AbstractCheckTest(unittest.TestCase):
    def test_can_represent_check_as_str(self):
        field_names = _TEST_FIELD_NAMES
        # TODO: Create an instance of the current class instead of AbstractCheck even for ancestors.

# Path: cutplace/checks.py
# class AbstractCheck(object):
# class IsUniqueCheck(AbstractCheck):
# class DistinctCountCheck(AbstractCheck):
#     def __init__(self, description, rule, available_field_names, location_of_definition=None):
#     def reset(self):
#     def check_row(self, field_name_to_value_map, location):
#     def check_at_end(self, location):
#     def cleanup(self):
#     def __str__(self):
#     def description(self):
#     def rule(self):
#     def location(self):
#     def location_of_rule(self):
#     def field_names(self):
#     def __init__(self, description, rule, available_field_names, location=None):
#     def reset(self):
#     def check_row(self, field_name_to_value_map, location):
#     def __init__(self, description, rule, available_field_names, location=None):
#     def reset(self):
#     def _distinct_count(self):
#     def _eval(self):
#     def check_row(self, field_name_to_value_map, location):
#     def check_at_end(self, location):
#     _COUNT_NAME = "count"
# 
# Path: cutplace/errors.py
# NAME_TO_ASCII_CODE_MAP = {"cr": 13, "ff": 12, "lf": 10, "tab": 9, "vt": 11}
# class Location(object):
# class CutplaceError(Exception):
# class DataError(CutplaceError):
# class InterfaceError(CutplaceError):
# class RangeValueError(DataError):
# class DataFormatError(DataError):
# class FieldValueError(DataError):
# class CheckError(DataError):
#     def __init__(self, file_path, has_column=False, has_cell=False, has_sheet=False):
#     def __copy__(self):
#     def advance_column(self, amount=1):
#     def advance_cell(self, amount=1):
#     def set_cell(self, new_cell):
#     def advance_line(self, amount=1):
#     def advance_sheet(self):
#     def cell(self):
#     def column(self):
#     def line(self):
#     def _get_sheet(self):
#     def _set_sheet(self, new_sheet):
#     def __str__(self):
#     def __repr__(self):
#     def __lt__(self, other):
#     def __eq__(self, other):
# def create_caller_location(modules_to_ignore=None, has_column=False, has_cell=False, has_sheet=False):
#     def __init__(self, message, location=None, see_also_message=None, see_also_location=None, cause=None):
#     def location(self):
#     def message(self):
#     def see_also_message(self):
#     def see_also_location(self):
#     def cause(self):
#     def prepend_message(self, prefix, new_location):
#     def __str__(self):


# Path: tests/test_checks.py
import logging
import unittest
from cutplace import checks, errors

#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
# for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.


_TEST_FIELD_NAMES = "branch_id customer_id first_name surname gender date_of_birth".split()


def _create_field_map(field_names, field_values):
    assert field_names
    assert field_values
    assert len(field_names) == len(field_values)

    return dict(zip(field_names, field_values))


class _AbstractCheckTest(unittest.TestCase):
    def test_can_represent_check_as_str(self):
        field_names = _TEST_FIELD_NAMES
        # TODO: Create an instance of the current class instead of AbstractCheck even for ancestors.

        check = checks.AbstractCheck("test check", "", field_names)