

def gen_integer(min_value=None, max_value=None):
    "Returns a random integer value based on the current platform.\n\n    :param int min_value: The minimum allowed value.\n    :param int max_value: The maximum allowed value.\n    :raises: ``ValueError`` if arguments are not integers or if they are\n        less or greater than the system's allowed range for integers.\n    :returns: Returns a random integer value.\n    :rtype: int\n\n    "
    _min_value = ((- sys.maxsize) - 1)
    _max_value = sys.maxsize
    if (min_value is None):
        min_value = _min_value
    if (max_value is None):
        max_value = _max_value
    if (sys.version_info[0] < 3):
        integer_types = (int, long)
    else:
        integer_types = (int,)
    if ((not isinstance(min_value, integer_types)) or (min_value < _min_value)):
        raise ValueError(("'%s' is not a valid minimum." % min_value))
    if ((not isinstance(max_value, integer_types)) or (max_value > _max_value)):
        raise ValueError(("'%s' is not a valid maximum." % max_value))
    random.seed()
    value = random.randint(min_value, max_value)
    return value

dataset/ETHPy150Open omaciel/fauxfactory/fauxfactory/__init__.py gen_integer/original