def METHOD_NAME(self, res):
    if isinstance(res, list):
        for val in res:
            if not isinstance(val, (int, float)):
                raise self.failureException(
                    "Test result list must be int or float")
    else:
        if not isinstance(res, (int, float)):
            raise self.failureException("Test result must be int or float")