# Path: termicoder/utils/icdiff.py
# class ConsoleDiff(object):
# class MultipleOption(Option):
#     def __init__(self, tabsize=8, wrapcolumn=None, linejunk=None,
#                  charjunk=difflib.IS_CHARACTER_JUNK, cols=80,
#                  line_numbers=False,
#                  show_all_spaces=False,
#                  highlight=False,
#                  no_bold=False,
#                  strip_trailing_cr=False):
#     def _tab_newline_replace(self, fromlines, tolines):
#         def expand_tabs(line):
#     def _strip_trailing_cr(self, lines):
#     def _all_cr_nl(self, lines):
#     def _display_len(self, s):
#         def width(c):
#     def _split_line(self, data_list, line_num, text):
#     def _line_wrapper(self, diffs):
#     def _collect_lines(self, diffs):
#     def _format_line(self, linenum, text):
#     def _add_line_numbers(self, linenum, text):
#     def _real_len(self, s):
#     def _rpad(self, s, field_width):
#     def _pad(self, s, field_width):
#     def _lpad(self, s, field_width):
#     def make_table(self, fromlines, tolines, fromdesc='', todesc='',
#                    context=False, numlines=5):
#     def _generate_table(self, fromdesc, todesc, diffs):
#     def colorize(self, s):
#         def background(color):
#         def will_see_coloredspace(i, s):
# def simple_colorize(s, chosen_color):
# def replace_all(replacements, string):
#     def take_action(self, action, dest, opt, value, values, parser):
# def create_option_parser():
# def set_cols_option(options):
#         def ioctl_GWINSZ(fd):
# def validate_has_two_arguments(parser, args):
# def start():
# def codec_print(s, options):
# def diff(options, a, b):
#     def print_meta(s):
# def read_file(fname, options):
# def diff_files(options, a, b):
#             C_ADD = color_codes["green"]
#             C_SUB = color_codes["red"]
#             C_CHG = color_codes["yellow"]
#             C_ADD = color_codes["green_bold"]
#             C_SUB = color_codes["red_bold"]
#             C_CHG = color_codes["yellow_bold"]
#             C_ADD, C_SUB, C_CHG = (background(C_ADD),
#                                    background(C_SUB),
#                                    background(C_CHG))
#         C_NONE = color_codes["none"]
#     ACTIONS = Option.ACTIONS + ("extend",)
#     STORE_ACTIONS = Option.STORE_ACTIONS + ("extend",)
#     TYPED_ACTIONS = Option.TYPED_ACTIONS + ("extend",)
#     ALWAYS_TYPED_ACTIONS = Option.ALWAYS_TYPED_ACTIONS + ("extend",)


from abc import ABC, abstractmethod
from ..utils import icdiff
#!/usr/bin/python
# -*- coding: utf-8 -*-

# ABC is the AbstractBaseClass in python


class Testcase(ABC):
    @abstractmethod
    def __init__(self, ans, inp, code):
        self.ans = ans
        self.inp = inp
        self.code = code

    # judges can override this if they want
    # this is used to produce diff on termicoder test
    def diff(self, out):
        ans_file_name = self.code + ".ans"
        out_file_name = self.code + ".out"
        ans_list = [x+'\n' for x in self.ans.split('\n')]
        out_list = [x+'\n' for x in out.split('\n')]

# Path: termicoder/utils/icdiff.py
# class ConsoleDiff(object):
# class MultipleOption(Option):
#     def __init__(self, tabsize=8, wrapcolumn=None, linejunk=None,
#                  charjunk=difflib.IS_CHARACTER_JUNK, cols=80,
#                  line_numbers=False,
#                  show_all_spaces=False,
#                  highlight=False,
#                  no_bold=False,
#                  strip_trailing_cr=False):
#     def _tab_newline_replace(self, fromlines, tolines):
#         def expand_tabs(line):
#     def _strip_trailing_cr(self, lines):
#     def _all_cr_nl(self, lines):
#     def _display_len(self, s):
#         def width(c):
#     def _split_line(self, data_list, line_num, text):
#     def _line_wrapper(self, diffs):
#     def _collect_lines(self, diffs):
#     def _format_line(self, linenum, text):
#     def _add_line_numbers(self, linenum, text):
#     def _real_len(self, s):
#     def _rpad(self, s, field_width):
#     def _pad(self, s, field_width):
#     def _lpad(self, s, field_width):
#     def make_table(self, fromlines, tolines, fromdesc='', todesc='',
#                    context=False, numlines=5):
#     def _generate_table(self, fromdesc, todesc, diffs):
#     def colorize(self, s):
#         def background(color):
#         def will_see_coloredspace(i, s):
# def simple_colorize(s, chosen_color):
# def replace_all(replacements, string):
#     def take_action(self, action, dest, opt, value, values, parser):
# def create_option_parser():
# def set_cols_option(options):
#         def ioctl_GWINSZ(fd):
# def validate_has_two_arguments(parser, args):
# def start():
# def codec_print(s, options):
# def diff(options, a, b):
#     def print_meta(s):
# def read_file(fname, options):
# def diff_files(options, a, b):
#             C_ADD = color_codes["green"]
#             C_SUB = color_codes["red"]
#             C_CHG = color_codes["yellow"]
#             C_ADD = color_codes["green_bold"]
#             C_SUB = color_codes["red_bold"]
#             C_CHG = color_codes["yellow_bold"]
#             C_ADD, C_SUB, C_CHG = (background(C_ADD),
#                                    background(C_SUB),
#                                    background(C_CHG))
#         C_NONE = color_codes["none"]
#     ACTIONS = Option.ACTIONS + ("extend",)
#     STORE_ACTIONS = Option.STORE_ACTIONS + ("extend",)
#     TYPED_ACTIONS = Option.TYPED_ACTIONS + ("extend",)
#     ALWAYS_TYPED_ACTIONS = Option.ALWAYS_TYPED_ACTIONS + ("extend",)


# Path: termicoder/models/Testcase.py
from abc import ABC, abstractmethod
from ..utils import icdiff

#!/usr/bin/python
# -*- coding: utf-8 -*-

# ABC is the AbstractBaseClass in python


class Testcase(ABC):
    @abstractmethod
    def __init__(self, ans, inp, code):
        self.ans = ans
        self.inp = inp
        self.code = code

    # judges can override this if they want
    # this is used to produce diff on termicoder test
    def diff(self, out):
        ans_file_name = self.code + ".ans"
        out_file_name = self.code + ".out"
        ans_list = [x+'\n' for x in self.ans.split('\n')]
        out_list = [x+'\n' for x in out.split('\n')]

        diffobj = icdiff.ConsoleDiff(line_numbers=True, show_all_spaces=True)