# 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 BaseScaleCase:
#     def handle_args(self, scale, filter, hpass=True, vpass=True):
#         self.scale = scale
#         self.filter = filter
#         self.hpass = hpass
#         self.vpass = vpass
#         self.dest_size = (
#             int(round(scale * self.size[0])) if hpass else self.size[0],
#             int(round(scale * self.size[1])) if vpass else self.size[1],
#         )
# 
#     def readable_args(self):
#         return [
#             "x".join(map(str, self.dest_size)),
#             self.filter_ids.get(self.filter, self.filter),
#         ]
# 
#     def readable_name(self):
#         return 'to ' + super().readable_name()
# 
# Path: testsuite/cases/cv2.py
# class Cv2TestCase(BaseTestCase):
#     def create_test_data(self):


from .base import rpartial, BaseScaleCase
from .cv2 import cv2, Cv2TestCase


class ScaleCase(BaseScaleCase, Cv2TestCase):
    def runner(self, im):
        cv2.resize(im, self.dest_size, interpolation=self.filter)


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
# 
# class BaseScaleCase:
#     def handle_args(self, scale, filter, hpass=True, vpass=True):
#         self.scale = scale
#         self.filter = filter
#         self.hpass = hpass
#         self.vpass = vpass
#         self.dest_size = (
#             int(round(scale * self.size[0])) if hpass else self.size[0],
#             int(round(scale * self.size[1])) if vpass else self.size[1],
#         )
# 
#     def readable_args(self):
#         return [
#             "x".join(map(str, self.dest_size)),
#             self.filter_ids.get(self.filter, self.filter),
#         ]
# 
#     def readable_name(self):
#         return 'to ' + super().readable_name()
# 
# Path: testsuite/cases/cv2.py
# class Cv2TestCase(BaseTestCase):
#     def create_test_data(self):


# Path: testsuite/cases/cv2_scale.py
from .base import rpartial, BaseScaleCase
from .cv2 import cv2, Cv2TestCase



class ScaleCase(BaseScaleCase, Cv2TestCase):
    def runner(self, im):
        cv2.resize(im, self.dest_size, interpolation=self.filter)


cases = [

    rpartial(ScaleCase, scale, flt, hpass=hpass, vpass=vpass)