(self)
| 691 | "Missing hardlink implementation") |
| 692 | @os_helper.skip_unless_symlink |
| 693 | def test_extract_hardlink(self): |
| 694 | # Test hardlink extraction (e.g. bug #857297). |
| 695 | with tarfile.open(tarname, errorlevel=1, encoding="iso8859-1") as tar: |
| 696 | tar.extract("ustar/regtype", TEMPDIR, filter='data') |
| 697 | self.addCleanup(os_helper.unlink, os.path.join(TEMPDIR, "ustar/regtype")) |
| 698 | |
| 699 | tar.extract("ustar/lnktype", TEMPDIR, filter='data') |
| 700 | self.addCleanup(os_helper.unlink, os.path.join(TEMPDIR, "ustar/lnktype")) |
| 701 | with open(os.path.join(TEMPDIR, "ustar/lnktype"), "rb") as f: |
| 702 | data = f.read() |
| 703 | self.assertEqual(sha256sum(data), sha256_regtype) |
| 704 | |
| 705 | tar.extract("ustar/symtype", TEMPDIR, filter='data') |
| 706 | self.addCleanup(os_helper.unlink, os.path.join(TEMPDIR, "ustar/symtype")) |
| 707 | with open(os.path.join(TEMPDIR, "ustar/symtype"), "rb") as f: |
| 708 | data = f.read() |
| 709 | self.assertEqual(sha256sum(data), sha256_regtype) |
| 710 | |
| 711 | @os_helper.skip_unless_working_chmod |
| 712 | def test_extractall(self): |
nothing calls this directly
no test coverage detected