# Path: testsuite/cases/base.py
# def rpartial(func, *args, **keywords):
#     """
#     right partial — same as functools.partial, but pass function args first
#     """
#     def newfunc(*fargs, **fkeywords):
#         newkeywords = keywords.copy()
#         newkeywords.update(fkeywords)
#         return func(*(fargs + args), **newkeywords)
#     newfunc.func = func
#     newfunc.args = args
#     newfunc.keywords = keywords
#     return newfunc
# 
# def root(*chunks):
#     return os.path.abspath(os.path.join(
#         os.path.dirname(__file__), '..', *chunks))
# 
# Path: testsuite/cases/wand.py
# class WandTestCase(BaseTestCase):
#     def __init__(self, *args, **kwargs):
#     def create_test_data(self):
#     def __del__(self):
#     def blur(self, radius, sigma):
#     def hald_lut(self, hald_image):


from .base import rpartial, root
from .wand import Image, WandTestCase


class CompositionCase(WandTestCase):
    def create_test_data(self):
        im = Image(filename=root('resources', 'color_circle.png'))
        im.resize(self.size[0], self.size[1], 'catrom')
        copy = im.clone()
        self._free_resources.append(im)
        self._free_resources.append(copy)
        return [im, copy]

    def runner(self, first, second):
        with first.clone() as res:
            res.composite(second, 0, 0)

    def readable_args(self):
        return ["Composition"]


cases = [

# Path: testsuite/cases/base.py
# def rpartial(func, *args, **keywords):
#     """
#     right partial — same as functools.partial, but pass function args first
#     """
#     def newfunc(*fargs, **fkeywords):
#         newkeywords = keywords.copy()
#         newkeywords.update(fkeywords)
#         return func(*(fargs + args), **newkeywords)
#     newfunc.func = func
#     newfunc.args = args
#     newfunc.keywords = keywords
#     return newfunc
# 
# def root(*chunks):
#     return os.path.abspath(os.path.join(
#         os.path.dirname(__file__), '..', *chunks))
# 
# Path: testsuite/cases/wand.py
# class WandTestCase(BaseTestCase):
#     def __init__(self, *args, **kwargs):
#     def create_test_data(self):
#     def __del__(self):
#     def blur(self, radius, sigma):
#     def hald_lut(self, hald_image):


# Path: testsuite/cases/wand_composition.py
from .base import rpartial, root
from .wand import Image, WandTestCase



class CompositionCase(WandTestCase):
    def create_test_data(self):
        im = Image(filename=root('resources', 'color_circle.png'))
        im.resize(self.size[0], self.size[1], 'catrom')
        copy = im.clone()
        self._free_resources.append(im)
        self._free_resources.append(copy)
        return [im, copy]

    def runner(self, first, second):
        with first.clone() as res:
            res.composite(second, 0, 0)

    def readable_args(self):
        return ["Composition"]


cases = [

    rpartial(CompositionCase),