(self)
| 785 | self.assertEqual(os.path.getmtime(path), tarinfo.mtime) |
| 786 | |
| 787 | def test_extract_pathlike_dir(self): |
| 788 | dirtype = "ustar/dirtype" |
| 789 | DIR = os.path.join(TEMPDIR, "extractall") |
| 790 | with os_helper.temp_dir(DIR), \ |
| 791 | tarfile.open(tarname, encoding="iso8859-1") as tar: |
| 792 | tarinfo = tar.getmember(dirtype) |
| 793 | tar.extract(tarinfo, path=os_helper.FakePath(DIR), filter='fully_trusted') |
| 794 | extracted = os.path.join(DIR, dirtype) |
| 795 | self.assertEqual(os.path.getmtime(extracted), tarinfo.mtime) |
| 796 | |
| 797 | def test_init_close_fobj(self): |
| 798 | # Issue #7341: Close the internal file object in the TarFile |
nothing calls this directly
no test coverage detected