| 463 | assert sorted(tar_data.getnames()) == ['bar', 'foo'] |
| 464 | |
| 465 | def tar_test_negative_mtime_bug(self): |
| 466 | base = tempfile.mkdtemp() |
| 467 | filename = os.path.join(base, 'th.txt') |
| 468 | self.addCleanup(shutil.rmtree, base) |
| 469 | with open(filename, 'w') as f: |
| 470 | f.write('Invisible Full Moon') |
| 471 | os.utime(filename, (12345, -3600.0)) |
| 472 | with tar(base) as archive: |
| 473 | tar_data = tarfile.open(fileobj=archive) |
| 474 | assert tar_data.getnames() == ['th.txt'] |
| 475 | assert tar_data.getmember('th.txt').mtime == -3600 |
| 476 | |
| 477 | @pytest.mark.skipif(IS_WINDOWS_PLATFORM, reason='No symlinks on Windows') |
| 478 | def test_tar_directory_link(self): |