MCPcopy Index your code
hub / github.com/RustPython/RustPython / read

Method read

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

Source from the content-addressed store, hash-verified

3133 class MyBytesIO(io.BytesIO):
3134 hit_eof = False
3135 def read(self, n):
3136 if self.hit_eof:
3137 raise AssertionError("infinite loop detected in "
3138 "tarfile.open()")
3139 self.hit_eof = self.tell() == len(self.getvalue())
3140 return super(MyBytesIO, self).read(n)
3141 def seek(self, *args):
3142 self.hit_eof = False
3143 return super(MyBytesIO, self).seek(*args)

Calls 4

lenFunction · 0.85
superClass · 0.85
tellMethod · 0.45
getvalueMethod · 0.45

Tested by

no test coverage detected