def METHOD_NAME(self):
    dll = CDLL(_ctypes_test.__file__)
    s = b"abcdefghijklmnopqrstuvwxyz"
    class allocated_c_char_p(c_char_p):
        pass
    dll.my_free.restype = None
    def errcheck(result, func, args):
        retval = result.value
        dll.my_free(result)
        return retval
    dll.my_strdup.restype = allocated_c_char_p
    dll.my_strdup.errcheck = errcheck
    try:
        res = dll.my_strdup(s)
        self.assertEqual(res, s)
    finally:
        del dll.my_strdup.errcheck