(self)
| 1522 | os_helper.rmdir(path) |
| 1523 | |
| 1524 | def test_gettarinfo_pathlike_name(self): |
| 1525 | with tarfile.open(tmpname, self.mode) as tar: |
| 1526 | path = os.path.join(TEMPDIR, "file") |
| 1527 | with open(path, "wb") as fobj: |
| 1528 | fobj.write(b"aaa") |
| 1529 | tarinfo = tar.gettarinfo(os_helper.FakePath(path)) |
| 1530 | tarinfo2 = tar.gettarinfo(path) |
| 1531 | self.assertIsInstance(tarinfo.name, str) |
| 1532 | self.assertEqual(tarinfo.name, tarinfo2.name) |
| 1533 | self.assertEqual(tarinfo.size, 3) |
| 1534 | |
| 1535 | @unittest.skipUnless(hasattr(os, "link"), |
| 1536 | "Missing hardlink implementation") |
nothing calls this directly
no test coverage detected