MCPcopy Index your code
hub / github.com/python/cpython / test_symlink_size

Method test_symlink_size

Lib/test/test_tarfile.py:1560–1571  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1558
1559 @os_helper.skip_unless_symlink
1560 def test_symlink_size(self):
1561 path = os.path.join(TEMPDIR, "symlink")
1562 os.symlink("link_target", path)
1563 try:
1564 tar = tarfile.open(tmpname, self.mode)
1565 try:
1566 tarinfo = tar.gettarinfo(path)
1567 self.assertEqual(tarinfo.size, 0)
1568 finally:
1569 tar.close()
1570 finally:
1571 os_helper.unlink(path)
1572
1573 def test_add_self(self):
1574 # Test for #1257255.

Callers

nothing calls this directly

Calls 6

gettarinfoMethod · 0.80
joinMethod · 0.45
openMethod · 0.45
assertEqualMethod · 0.45
closeMethod · 0.45
unlinkMethod · 0.45

Tested by

no test coverage detected