django_any/xunit.py
def any_decimal(min_value=Decimal(0), max_value=Decimal('99.99'), decimal_places=2):
    """
    Return random decimal from the [min_value, max_value] interval

    >>> result = any_decimal(min_value=0.999, max_value=3, decimal_places=3)
    >>> type(result)
    <class 'decimal.Decimal'>
    >>> result >= Decimal('0.999') and result <= Decimal(3)
    True
    """
    return Decimal(str(any_float(min_value=float(min_value),
                                 max_value=float(max_value),
                                 precision=decimal_places)))
def any_decimal(min_value=Decimal(0), max_value=Decimal('99.99'), decimal_places=2):
    """
    Return random decimal from the [min_value, max_value] interval

    >>> result = any_decimal(min_value=0.999, max_value=3, decimal_places=3)
    >>> type(result)
    <class 'decimal.Decimal'>
    >>> result >= Decimal('0.999') and result <= Decimal(3)
    True
    """
    return Decimal(str(any_float(min_value=float(min_value),
                                 max_value=float(max_value),
                                 precision=decimal_places)))
def any_decimal ( min_value = Decimal ( 0 ) , max_value = Decimal ( '99.99' ) , decimal_places = 2 ) : return Decimal ( str ( any_float ( min_value = float ( min_value ) , max_value = float ( max_value ) , precision = decimal_places ) ) )
Return random decimal from the [min_value, max_value] interval

    >>> result = any_decimal(min_value=0.999, max_value=3, decimal_places=3)
    >>> type(result)
    <class 'decimal.Decimal'>
    >>> result >= Decimal('0.999') and result <= Decimal(3)
    True
Return random decimal from the [ min_value max_value ] interval >>> result = any_decimal ( min_value = 0 . 999 max_value = 3 decimal_places = 3 ) >>> type ( result ) <class decimal . Decimal > >>> result > = Decimal ( 0 . 999 ) and result < = Decimal ( 3 ) True