MCPcopy Index your code
hub / github.com/python/cpython / read

Method read

Lib/test/test_tarfile.py:3152–3157  ·  view source on GitHub ↗
(self, n)

Source from the content-addressed store, hash-verified

3150 class MyBytesIO(io.BytesIO):
3151 hit_eof = False
3152 def read(self, n):
3153 if self.hit_eof:
3154 raise AssertionError("infinite loop detected in "
3155 "tarfile.open()")
3156 self.hit_eof = self.tell() == len(self.getvalue())
3157 return super(MyBytesIO, self).read(n)
3158 def seek(self, *args):
3159 self.hit_eof = False
3160 return super(MyBytesIO, self).seek(*args)

Calls 3

superClass · 0.85
tellMethod · 0.45
getvalueMethod · 0.45

Tested by

no test coverage detected