MCPcopy Index your code
hub / github.com/RustPython/RustPython / _setup_symlink_to_target

Method _setup_symlink_to_target

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

Source from the content-addressed store, hash-verified

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

Calls 3

openFunction · 0.50
joinMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected