# Path: knights/compiler.py
# def kompile(src, raw=False, filename='<compiler>', loader=None, **kwargs):
# 
# Path: knights/loader.py
# PATHS = []
# class TemplateNotFound(Exception):
# class TemplateLoader(dict):
#     def __init__(self, paths):
#     def load(self, name, raw=False):
#     def __missing__(self, key):


import pathlib
import unittest
from knights import compiler, loader




class Mock(object):
    def __init__(self, **kwargs):
        for k, v in kwargs.items():
            setattr(self, k, v)


class TemplateTestCase(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        cls.loader = loader.TemplateLoader([
            pathlib.Path(__file__).parent / 'templates',
        ])

    def assertRendered(self, source, expected, context=None):
        try:

# Path: knights/compiler.py
# def kompile(src, raw=False, filename='<compiler>', loader=None, **kwargs):
# 
# Path: knights/loader.py
# PATHS = []
# class TemplateNotFound(Exception):
# class TemplateLoader(dict):
#     def __init__(self, paths):
#     def load(self, name, raw=False):
#     def __missing__(self, key):


# Path: tests/utils.py
import pathlib
import unittest
from knights import compiler, loader





class Mock(object):
    def __init__(self, **kwargs):
        for k, v in kwargs.items():
            setattr(self, k, v)


class TemplateTestCase(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        cls.loader = loader.TemplateLoader([
            pathlib.Path(__file__).parent / 'templates',
        ])

    def assertRendered(self, source, expected, context=None):
        try:

            tmpl = compiler.kompile(source, loader=self.loader)