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

Method _setup_symlink_to_target

Lib/test/test_tarfile.py:844–852  ·  view source on GitHub ↗
(self, temp_dirpath)

Source from the content-addressed store, hash-verified

842 self.assertEqual(tf.next(), None)
843
844 def _setup_symlink_to_target(self, temp_dirpath):
845 target_filepath = os.path.join(temp_dirpath, "target")
846 ustar_dirpath = os.path.join(temp_dirpath, "ustar")
847 hardlink_filepath = os.path.join(ustar_dirpath, "lnktype")
848 with open(target_filepath, "wb") as f:
849 f.write(b"target")
850 os.makedirs(ustar_dirpath)
851 os.symlink(target_filepath, hardlink_filepath)
852 return target_filepath, hardlink_filepath
853
854 def _assert_on_file_content(self, filepath, digest):
855 with open(filepath, "rb") as f:

Calls 3

openFunction · 0.50
joinMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected