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