def test_weighted_5(): data = bson.Decimal128("5.5") assert Weighted(data) == (2, _cmp_decimal(data))
def test_weighted__cmp_decimal_le_or_ge(): if PY3: with pytest.raises(TypeError): _cmp_decimal(bson.Decimal128("5.5")) >= "NAN" else: assert (_cmp_decimal(bson.Decimal128("5.5")) >= "NAN") is False
def test_weighted__cmp_decimal_err(): with pytest.raises(TypeError): _cmp_decimal("Not_A_Decimal128")
def test_weighted__cmp_decimal_ne(): assert _cmp_decimal(bson.Decimal128("5.5")) != "NAN"
def test_weighted_26(): data = _cmp_decimal(bson.Decimal128("0.1")) assert Weighted(data) == (2, data)