MCPcopy Create free account
hub / github.com/Chia-Network/clvm / check

Method check

tests/object_cache_test.py:9–14  ·  view source on GitHub ↗
(self, obj_text: str, expected_hash: str, expected_length: int)

Source from the content-addressed store, hash-verified

7
8class ObjectCacheTest(unittest.TestCase):
9 def check(self, obj_text: str, expected_hash: str, expected_length: int) -> None:
10 obj = assemble(obj_text)
11 th = ObjectCache(treehash)
12 self.assertEqual(th.get(obj).hex(), expected_hash)
13 sl = ObjectCache(serialized_length)
14 self.assertEqual(sl.get(obj), expected_length)
15
16 def test_various(self) -> None:
17 self.check(

Callers 1

test_variousMethod · 0.95

Calls 2

getMethod · 0.95
ObjectCacheClass · 0.90

Tested by

no test coverage detected