diff --git a/test/test_stack/test_bloomfilter.py b/test/test_stack/test_bloomfilter.py index 2022fb50..a3f4833d 100644 --- a/test/test_stack/test_bloomfilter.py +++ b/test/test_stack/test_bloomfilter.py @@ -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): @@ -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)