MCPcopy
hub / github.com/redis/redis-py / test_create

Function test_create

tests/test_asyncio/test_bloom.py:24–35  ·  view source on GitHub ↗

Test CREATE/RESERVE calls

(decoded_r: redis.Redis)

Source from the content-addressed store, hash-verified

22
23@pytest.mark.redismod
24async def test_create(decoded_r: redis.Redis):
25 """Test CREATE/RESERVE calls"""
26 assert await decoded_r.bf().create("bloom", 0.01, 1000)
27 assert await decoded_r.bf().create("bloom_e", 0.01, 1000, expansion=1)
28 assert await decoded_r.bf().create("bloom_ns", 0.01, 1000, noScale=True)
29 assert await decoded_r.cf().create("cuckoo", 1000)
30 assert await decoded_r.cf().create("cuckoo_e", 1000, expansion=1)
31 assert await decoded_r.cf().create("cuckoo_bs", 1000, bucket_size=4)
32 assert await decoded_r.cf().create("cuckoo_mi", 1000, max_iterations=10)
33 assert await decoded_r.cms().initbydim("cmsDim", 100, 5)
34 assert await decoded_r.cms().initbyprob("cmsProb", 0.01, 0.01)
35 assert await decoded_r.topk().reserve("topk", 5, 100, 5, 0.9)
36
37
38@pytest.mark.experimental

Callers

nothing calls this directly

Calls 8

initbydimMethod · 0.80
initbyprobMethod · 0.80
reserveMethod · 0.80
createMethod · 0.45
bfMethod · 0.45
cfMethod · 0.45
cmsMethod · 0.45
topkMethod · 0.45

Tested by

no test coverage detected