예제 #1
0
def test_weighted_5():
    data = Decimal128("5.5")
    assert Weighted(data) == (2, _cmp_decimal(data))
예제 #2
0
def test_weighted__cmp_decimal_le_or_ge():
    if PY3:
        with pytest.raises(TypeError):
            _cmp_decimal(Decimal128("5.5")) >= "NAN"
    else:
        assert (_cmp_decimal(Decimal128("5.5")) >= "NAN") is False
예제 #3
0
def test_weighted__cmp_decimal_err():
    with pytest.raises(TypeError):
        _cmp_decimal("Not_A_Decimal128")
예제 #4
0
def test_weighted__cmp_decimal_ne():
    assert _cmp_decimal(Decimal128("5.5")) != "NAN"
예제 #5
0
def test_weighted_26():
    data = _cmp_decimal(Decimal128("0.1"))
    assert Weighted(data) == (2, data)