MCPcopy
hub / github.com/benoitc/gunicorn / szread

Method szread

tests/treq.py:160–165  ·  view source on GitHub ↗
(self, func, sizes)

Source from the content-addressed store, hash-verified

158 # and one of the size functions.
159
160 def szread(self, func, sizes):
161 sz = sizes()
162 data = func(sz)
163 if 0 <= sz < len(data):
164 raise AssertionError("Read more than %d bytes: %s" % (sz, data))
165 return data
166
167 def match_read(self, req, body, sizes):
168 data = self.szread(req.body.read, sizes)

Callers 2

match_readMethod · 0.95
match_readlineMethod · 0.95

Calls 1

funcFunction · 0.85

Tested by

no test coverage detected