# Path: testsuite/cases/base.py
# class BaseTestCase:
#     def __init__(self, size, mode, *args, **kwargs):
#         self.size = size
#         self.mode = mode
#         self.repeat = kwargs.pop('repeat', 1)
#         self.handle_args(*args, **kwargs)
#         self.data = self.create_test_data()
# 
#     def handle_args(self, *args, **kwargs):
#         self.args = args
#         self.kwargs = kwargs
# 
#     def create_test_data(self):
#         return []
# 
#     def run(self):
#         start = time.time()
#         for _ in range(self.repeat):
#             self.runner(*self.data)
#         return (time.time() - start) / self.repeat
# 
#     __call__ = run
# 
#     def readable_args(self):
#         return list(map(str, self.args))
# 
#     def readable_name(self):
#         return " ".join(self.readable_args())
# 
# def root(*chunks):
#     return os.path.abspath(os.path.join(
#         os.path.dirname(__file__), '..', *chunks))


import math
from PIL import Image, ImageFilter, ImageOps
from .base import BaseTestCase, root




Image.LANCZOS = Image.ANTIALIAS


class PillowTestCase(BaseTestCase):
    filter_ids = {
        0: 'ner', 1: 'lzs', 2: 'bil', 3: 'bic',
        4: 'box', 5: 'hmn', 6: 'mtc',
    }

    def create_test_data(self):

# Path: testsuite/cases/base.py
# class BaseTestCase:
#     def __init__(self, size, mode, *args, **kwargs):
#         self.size = size
#         self.mode = mode
#         self.repeat = kwargs.pop('repeat', 1)
#         self.handle_args(*args, **kwargs)
#         self.data = self.create_test_data()
# 
#     def handle_args(self, *args, **kwargs):
#         self.args = args
#         self.kwargs = kwargs
# 
#     def create_test_data(self):
#         return []
# 
#     def run(self):
#         start = time.time()
#         for _ in range(self.repeat):
#             self.runner(*self.data)
#         return (time.time() - start) / self.repeat
# 
#     __call__ = run
# 
#     def readable_args(self):
#         return list(map(str, self.args))
# 
#     def readable_name(self):
#         return " ".join(self.readable_args())
# 
# def root(*chunks):
#     return os.path.abspath(os.path.join(
#         os.path.dirname(__file__), '..', *chunks))


# Path: testsuite/cases/pillow.py
import math
from PIL import Image, ImageFilter, ImageOps
from .base import BaseTestCase, root





Image.LANCZOS = Image.ANTIALIAS


class PillowTestCase(BaseTestCase):
    filter_ids = {
        0: 'ner', 1: 'lzs', 2: 'bil', 3: 'bic',
        4: 'box', 5: 'hmn', 6: 'mtc',
    }

    def create_test_data(self):

        im = Image.open(root('resources', 'color_circle.png'))