# 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
# 
# class BaseConvertCase:
#     def handle_args(self, mode, mode_to):
#         self.mode = mode
#         self.mode_to = mode_to
# 
#     def readable_args(self):
#         return ["{} to {}".format(self.mode, self.mode_to)]
# 
# Path: testsuite/cases/pgmagick.py
# class PgmagickTestCase(BaseTestCase):
#     def create_test_data(self):


from .base import rpartial, BaseConvertCase
from .pgmagick import Image, ImageType, PgmagickTestCase


class ConvertCase(BaseConvertCase, PgmagickTestCase):
    def runner(self, im):
        im = Image(im)
        if self.mode_to == 'L':

# 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
# 
# class BaseConvertCase:
#     def handle_args(self, mode, mode_to):
#         self.mode = mode
#         self.mode_to = mode_to
# 
#     def readable_args(self):
#         return ["{} to {}".format(self.mode, self.mode_to)]
# 
# Path: testsuite/cases/pgmagick.py
# class PgmagickTestCase(BaseTestCase):
#     def create_test_data(self):


# Path: testsuite/cases/pgmagick_convert.py
from .base import rpartial, BaseConvertCase
from .pgmagick import Image, ImageType, PgmagickTestCase



class ConvertCase(BaseConvertCase, PgmagickTestCase):
    def runner(self, im):
        im = Image(im)
        if self.mode_to == 'L':

            im.type(ImageType.GrayscaleType)