def METHOD_NAME(self, func):
    cfunc = njit(lambda *x: func(*x))
    func_name = func._name
    unsupported_types = filter(
        lambda x: not isinstance(x, types.Integer), types.number_domain
    )
    for typ in sorted(unsupported_types, key=str):
        with self.assertRaises(TypingError) as e:
            cfunc(typ(2))
        self.assertIn(
            "{} is only defined for integers, but value passed was '{}'."
            .format(func_name, typ),
            str(e.exception),
        )
    # Testing w/ too many/few arguments
    def check(args, string):
        with self.assertRaises((TypingError, TypeError)) as e:
            cfunc(*args)
        self.assertIn(
            "{}() ".format(func_name),
            str(e.exception)
        )
    check((1, 2), "takes 2 positional arguments but 3 were given")
    check((), "missing 1 required positional argument")