MCPcopy
hub / github.com/huggingface/datasets / tar_file_with_dot_dot

Function tar_file_with_dot_dot

tests/test_extract.py:144–152  ·  view source on GitHub ↗
(tmp_path, text_file)

Source from the content-addressed store, hash-verified

142
143@pytest.fixture
144def tar_file_with_dot_dot(tmp_path, text_file):
145 import tarfile
146
147 directory = tmp_path / "data_dot_dot"
148 directory.mkdir()
149 path = directory / "tar_file_with_dot_dot.tar"
150 with tarfile.TarFile(path, "w") as f:
151 f.add(text_file, arcname=os.path.join("..", text_file.name))
152 return path
153
154
155@pytest.fixture

Callers

nothing calls this directly

Calls 2

mkdirMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected