# Path: test/objects/kifu_checker.py
# class KifuChecker(golib.model.Kifu):
#     def __init__(self, ref_sgf, failfast=False, bounds=(0, 1000)):
#     def check(self):
# def print_matcher(matcher):
# def display_matcher(matcher, master=None):
# def concat(seq, start, end):


import argparse
import os.path
import queue
import tkinter
import glmain
import ckmain
import camkifu.core
import test.objects
from test.objects import kifu_checker
    root2.title(title)


def main(ref_sgf, video=0, vid_bounds=(0, 1), mv_bounds=0, failfast=False, bf=None, sf=None):
    root = tkinter.Tk(className="Detection Test")
    root.withdraw()
    imqueue = queue.Queue(maxsize=10)
    controller = test.objects.ControllerVTest(ref_sgf, video=video, vid_bounds=vid_bounds, mv_bounds=mv_bounds, failfast=failfast)
    vmanager = camkifu.core.VManager(controller, imqueue=imqueue, bf=bf, sf=sf)
    vmanager.start()

    def tk_routine():
        ckmain.img_update(imqueue)
        if vmanager.hasrun and not vmanager.is_processing():
            root.destroy()
        else:
            root.after(5, tk_routine)

    try:
        root.after(5, tk_routine)
        glmain.bring_to_front()
        root.mainloop()
    finally:
        vmanager.stop_processing()

    # display test results
    root2 = tkinter.Tk()
    set_title(root2, video, vmanager)
    matcher = controller.kifu.check()
    frame = kifu_checker.display_matcher(matcher, master=root2)

# Path: test/objects/kifu_checker.py
# class KifuChecker(golib.model.Kifu):
#     def __init__(self, ref_sgf, failfast=False, bounds=(0, 1000)):
#     def check(self):
# def print_matcher(matcher):
# def display_matcher(matcher, master=None):
# def concat(seq, start, end):


# Path: test/mains/detectiontest.py
import argparse
import os.path
import queue
import tkinter
import glmain
import ckmain
import camkifu.core
import test.objects
from test.objects import kifu_checker

    root2.title(title)


def main(ref_sgf, video=0, vid_bounds=(0, 1), mv_bounds=0, failfast=False, bf=None, sf=None):
    root = tkinter.Tk(className="Detection Test")
    root.withdraw()
    imqueue = queue.Queue(maxsize=10)
    controller = test.objects.ControllerVTest(ref_sgf, video=video, vid_bounds=vid_bounds, mv_bounds=mv_bounds, failfast=failfast)
    vmanager = camkifu.core.VManager(controller, imqueue=imqueue, bf=bf, sf=sf)
    vmanager.start()

    def tk_routine():
        ckmain.img_update(imqueue)
        if vmanager.hasrun and not vmanager.is_processing():
            root.destroy()
        else:
            root.after(5, tk_routine)

    try:
        root.after(5, tk_routine)
        glmain.bring_to_front()
        root.mainloop()
    finally:
        vmanager.stop_processing()

    # display test results
    root2 = tkinter.Tk()
    set_title(root2, video, vmanager)
    matcher = controller.kifu.check()
    frame = kifu_checker.display_matcher(matcher, master=root2)

    kifu_checker.print_matcher(matcher)