(self)
| 1200 | self.assertEqual(tarinfo.linkname, longname, "linkname wrong") |
| 1201 | |
| 1202 | def test_truncated_longname(self): |
| 1203 | longname = self.subdir + "/" + "123/" * 125 + "longname" |
| 1204 | tarinfo = self.tar.getmember(longname) |
| 1205 | offset = tarinfo.offset |
| 1206 | self.tar.fileobj.seek(offset) |
| 1207 | fobj = io.BytesIO(self.tar.fileobj.read(3 * 512)) |
| 1208 | with self.assertRaises(tarfile.ReadError): |
| 1209 | tarfile.open(name="foo.tar", fileobj=fobj) |
| 1210 | |
| 1211 | def test_header_offset(self): |
| 1212 | # Test if the start offset of the TarInfo object includes |
nothing calls this directly
no test coverage detected