# 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))
# 
# class BaseLoadCase(BaseTestCase):
#     def handle_args(self, filetype, filename):
#         self.filetype = filetype
#         self.filename = filename
# 
#     def readable_args(self):
#         return ["{} load".format(self.filetype.capitalize())]
# 
# class BaseSaveCase(BaseTestCase):
#     def handle_args(self, filetype, filename):
#         self.filetype = filetype
#         self.filename = filename
# 
#     def readable_args(self):
#         return ["{} save".format(self.filetype.capitalize())]
# 
# Path: testsuite/cases/vips.py
# class VipsTestCase(BaseTestCase):
#     def resize(cls, im, *args, **kwargs):


from .base import rpartial, root, BaseLoadCase, BaseSaveCase
from .vips import Image


class LoadCase(BaseLoadCase):
    def runner(self):
        im = Image.new_from_file(root('resources', self.filename))
        im.getpoint(0, 0)



# 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))
# 
# class BaseLoadCase(BaseTestCase):
#     def handle_args(self, filetype, filename):
#         self.filetype = filetype
#         self.filename = filename
# 
#     def readable_args(self):
#         return ["{} load".format(self.filetype.capitalize())]
# 
# class BaseSaveCase(BaseTestCase):
#     def handle_args(self, filetype, filename):
#         self.filetype = filetype
#         self.filename = filename
# 
#     def readable_args(self):
#         return ["{} save".format(self.filetype.capitalize())]
# 
# Path: testsuite/cases/vips.py
# class VipsTestCase(BaseTestCase):
#     def resize(cls, im, *args, **kwargs):


# Path: testsuite/cases/vips_load.py
from .base import rpartial, root, BaseLoadCase, BaseSaveCase
from .vips import Image



class LoadCase(BaseLoadCase):
    def runner(self):
        im = Image.new_from_file(root('resources', self.filename))
        im.getpoint(0, 0)



class SaveCase(BaseSaveCase):