MCPcopy Create free account
hub / github.com/wal-e/wal-e / test_refragment

Function test_refragment

tests/test_bytedeque.py:30–39  ·  view source on GitHub ↗
(bd)

Source from the content-addressed store, hash-verified

28
29
30def test_refragment(bd):
31 byts = b'1234'
32 bd.add(byts)
33 assert bd.byteSz == len(byts)
34
35 for ordinal, byt in enumerate(byts):
36 assert bd.get(1) == bytes([byt])
37 assert bd.byteSz == len(byts) - ordinal - 1
38
39 assert bd.byteSz == 0
40
41
42def test_exact_fragment(bd):

Callers

nothing calls this directly

Calls 2

addMethod · 0.80
getMethod · 0.80

Tested by

no test coverage detected