MCPcopy
hub / github.com/mitmproxy/mitmproxy / chunks

Function chunks

test/mitmproxy/proxy/layers/http/test_http_fuzz.py:103–115  ·  view source on GitHub ↗
(draw, elements)

Source from the content-addressed store, hash-verified

101
102@composite
103def chunks(draw, elements):
104 data = draw(elements)
105
106 chunks = []
107 a, b = sorted([draw(integers(0, len(data))), draw(integers(0, len(data)))])
108 if a > 0:
109 chunks.append(data[:a])
110 if a != b:
111 chunks.append(data[a:b])
112 if b < len(data):
113 chunks.append(data[b:])
114
115 return chunks
116
117
118@composite

Callers

nothing calls this directly

Calls 2

drawFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…