(self)
| 1505 | os_helper.rmdir(path) |
| 1506 | |
| 1507 | def test_gettarinfo_pathlike_name(self): |
| 1508 | with tarfile.open(tmpname, self.mode) as tar: |
| 1509 | path = os.path.join(TEMPDIR, "file") |
| 1510 | with open(path, "wb") as fobj: |
| 1511 | fobj.write(b"aaa") |
| 1512 | tarinfo = tar.gettarinfo(os_helper.FakePath(path)) |
| 1513 | tarinfo2 = tar.gettarinfo(path) |
| 1514 | self.assertIsInstance(tarinfo.name, str) |
| 1515 | self.assertEqual(tarinfo.name, tarinfo2.name) |
| 1516 | self.assertEqual(tarinfo.size, 3) |
| 1517 | |
| 1518 | @unittest.skipUnless(hasattr(os, "link"), |
| 1519 | "Missing hardlink implementation") |
nothing calls this directly
no test coverage detected