示例#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)