Skip to content

Commit

Permalink
fix:tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cunla committed Oct 2, 2024
1 parent 5d407fd commit b53d62d
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions test/test_stack/test_bloomfilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ def test_create_cf(r: redis.Redis):

def test_bf_reserve(r: redis.Redis):
assert r.bf().reserve("bloom", 0.01, 1000)
assert r.bf().reserve("bloom_e", 0.01, 1000, expansion=1)
assert r.bf().reserve("bloom_ns", 0.01, 1000, noScale=True)
with pytest.raises(redis.exceptions.ResponseError, match=msgs.NONSCALING_FILTERS_CANNOT_EXPAND_MSG):
assert r.bf().reserve("bloom_e", 0.01, 1000, expansion=1, noScale=True)
with pytest.raises(redis.exceptions.ResponseError, match=msgs.ITEM_EXISTS_MSG):
assert r.bf().reserve("bloom", 0.01, 1000)


def test_bf_add(r: redis.Redis):
Expand Down Expand Up @@ -108,15 +111,6 @@ def test_bf_mexists(r: redis.Redis):
r.bf().add("key1", "v")


def test_bf_reserve(r: redis.Redis):
assert r.bf().reserve("bloom", 0.01, 1000)
assert r.bf().reserve("bloom_ns", 0.01, 1000, noScale=True)
with pytest.raises(redis.exceptions.ResponseError, match=msgs.NONSCALING_FILTERS_CANNOT_EXPAND_MSG):
assert r.bf().reserve("bloom_e", 0.01, 1000, expansion=1, noScale=True)
with pytest.raises(redis.exceptions.ResponseError, match=msgs.ITEM_EXISTS_MSG):
assert r.bf().reserve("bloom", 0.01, 1000)


@pytest.mark.unsupported_server_types("dragonfly")
def test_bf_insert(r: redis.Redis):
assert r.bf().create("key", 0.01, 1000)
Expand Down

0 comments on commit b53d62d

Please sign in to comment.