# 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/pgmagick.py
# class PgmagickTestCase(BaseTestCase):
#     def create_test_data(self):


from .base import rpartial, root
from .pgmagick import Image, Geometry, FilterTypes, PgmagickTestCase


class CompositionCase(PgmagickTestCase):
    def create_test_data(self):
        im = Image(root('resources', 'color_circle.png').encode('utf-8'))
        im.filterType(FilterTypes.CatromFilter)

# 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/pgmagick.py
# class PgmagickTestCase(BaseTestCase):
#     def create_test_data(self):


# Path: testsuite/cases/pgmagick_composition.py
from .base import rpartial, root
from .pgmagick import Image, Geometry, FilterTypes, PgmagickTestCase



class CompositionCase(PgmagickTestCase):
    def create_test_data(self):
        im = Image(root('resources', 'color_circle.png').encode('utf-8'))
        im.filterType(FilterTypes.CatromFilter)

        im.scale(Geometry("{}x{}!".format(self.size[0], self.size[1])))