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

Method test_fileobj_text

Lib/test/test_tarfile.py:216–226  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

214 "read() after readline() failed")
215
216 def test_fileobj_text(self):
217 with self.tar.extractfile("ustar/regtype") as fobj:
218 fobj = io.TextIOWrapper(fobj)
219 data = fobj.read().encode("iso8859-1")
220 self.assertEqual(sha256sum(data), sha256_regtype)
221 try:
222 fobj.seek(100)
223 except AttributeError:
224 # Issue #13815: seek() complained about a missing
225 # flush() method.
226 self.fail("seeking failed in text mode")
227
228 # Test if symbolic and hard links are resolved by extractfile(). The
229 # test link members each point to a regular member whose data is

Callers

nothing calls this directly

Calls 7

readMethod · 0.95
seekMethod · 0.95
sha256sumFunction · 0.85
extractfileMethod · 0.80
encodeMethod · 0.45
assertEqualMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected