# 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/pillow.py
# class PillowTestCase(BaseTestCase):
#     def create_test_data(self):
#     def resize(cls, self, size, resample=Image.NEAREST):
#     def gaussian_blur(cls, self, radius, n=3):
#     def getchannel(cls, self, channel):
#         L = math.sqrt(12.0 * float(radius) * radius / n + 1.0)


from .base import rpartial, root
from .pillow import Image, PillowTestCase


class CompositionCase(PillowTestCase):
    def create_test_data(self):
        im = Image.open(root('resources', 'color_circle.png'))
        im = self.resize(im, self.size, Image.BICUBIC)
        return [im, im.copy()]

    def runner(self, first, second):
        Image.alpha_composite(first, second)

    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/pillow.py
# class PillowTestCase(BaseTestCase):
#     def create_test_data(self):
#     def resize(cls, self, size, resample=Image.NEAREST):
#     def gaussian_blur(cls, self, radius, n=3):
#     def getchannel(cls, self, channel):
#         L = math.sqrt(12.0 * float(radius) * radius / n + 1.0)


# Path: testsuite/cases/pillow_composition.py
from .base import rpartial, root
from .pillow import Image, PillowTestCase



class CompositionCase(PillowTestCase):
    def create_test_data(self):
        im = Image.open(root('resources', 'color_circle.png'))
        im = self.resize(im, self.size, Image.BICUBIC)
        return [im, im.copy()]

    def runner(self, first, second):
        Image.alpha_composite(first, second)

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


cases = [

    rpartial(CompositionCase),