MCPcopy Create free account
hub / github.com/LMCache/LMCache / test_parse_cache_engine_key

Method test_parse_cache_engine_key

tests/test_utils.py:500–511  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

498# ============================================================
499class TestCacheKeyParsing:
500 def test_parse_cache_engine_key(self):
501 key = CacheEngineKey(
502 model_name="m",
503 world_size=1,
504 worker_id=0,
505 chunk_hash=0xABC,
506 dtype=torch.float16,
507 )
508 s = key.to_string()
509 parsed = parse_cache_key(s)
510 assert isinstance(parsed, CacheEngineKey)
511 assert parsed == key
512
513 @pytest.mark.xfail(
514 reason="parse_cache_key bug: cannot parse LayerCacheEngineKey with dtype"

Callers

nothing calls this directly

Calls 3

to_stringMethod · 0.95
CacheEngineKeyClass · 0.90
parse_cache_keyFunction · 0.90

Tested by

no test coverage detected