MCPcopy Create free account
hub / github.com/Open-Bee/DataStudio / test_get_shard_id

Method test_get_shard_id

tests/utils/test_other_utils.py:387–394  ·  view source on GitHub ↗

Test get_shard_id.

(self)

Source from the content-addressed store, hash-verified

385 """Tests for datastudio.utils.database module (LMDB)."""
386
387 def test_get_shard_id(self):
388 """Test get_shard_id."""
389 from datastudio.utils.database import get_shard_id
390
391 shard_id = get_shard_id("test_key", num_shards=32)
392
393 assert isinstance(shard_id, int)
394 assert 0 <= shard_id < 32
395
396 def test_get_shard_id_consistent(self):
397 """Test get_shard_id is consistent."""

Callers

nothing calls this directly

Calls 1

get_shard_idFunction · 0.90

Tested by

no test coverage detected