# 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
# 
# Path: testsuite/cases/cv2.py
# class Cv2TestCase(BaseTestCase):
#     def create_test_data(self):


from math import ceil
from .base import rpartial
from .cv2 import cv2, Cv2TestCase



class BlurCase(Cv2TestCase):
    def handle_args(self, radius):
        self.radius = radius

    def runner(self, im):
        window = 1 + int(ceil(self.radius * 2.5)) * 2
        cv2.GaussianBlur(im, (window, window), self.radius)

    def readable_args(self):
        return ["{}px".format(self.radius)]


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
# 
# Path: testsuite/cases/cv2.py
# class Cv2TestCase(BaseTestCase):
#     def create_test_data(self):


# Path: testsuite/cases/cv2_blur.py
from math import ceil
from .base import rpartial
from .cv2 import cv2, Cv2TestCase




class BlurCase(Cv2TestCase):
    def handle_args(self, radius):
        self.radius = radius

    def runner(self, im):
        window = 1 + int(ceil(self.radius * 2.5)) * 2
        cv2.GaussianBlur(im, (window, window), self.radius)

    def readable_args(self):
        return ["{}px".format(self.radius)]


cases = [

    rpartial(BlurCase, radius)