(self)
| 1485 | tar.close() |
| 1486 | |
| 1487 | def test_directory_size(self): |
| 1488 | path = os.path.join(TEMPDIR, "directory") |
| 1489 | os.mkdir(path) |
| 1490 | try: |
| 1491 | tar = tarfile.open(tmpname, self.mode) |
| 1492 | try: |
| 1493 | tarinfo = tar.gettarinfo(path) |
| 1494 | self.assertEqual(tarinfo.size, 0) |
| 1495 | finally: |
| 1496 | tar.close() |
| 1497 | finally: |
| 1498 | os_helper.rmdir(path) |
| 1499 | |
| 1500 | # mock the following: |
| 1501 | # os.listdir: so we know that files are in the wrong order |
nothing calls this directly
no test coverage detected