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

Function complex_data_dir

tests/test_load.py:255–267  ·  view source on GitHub ↗
(tmp_path)

Source from the content-addressed store, hash-verified

253
254@pytest.fixture
255def complex_data_dir(tmp_path):
256 data_dir = tmp_path / "complex_data_dir"
257 data_dir.mkdir()
258 (data_dir / "data").mkdir()
259 with open(data_dir / "data" / "train.txt", "w") as f:
260 f.write("foo\n" * 10)
261 with open(data_dir / "data" / "test.txt", "w") as f:
262 f.write("bar\n" * 10)
263 with open(data_dir / "README.md", "w") as f:
264 f.write("This is a readme")
265 with open(data_dir / ".dummy", "w") as f:
266 f.write("this is a dummy file that is not a data file")
267 return str(data_dir)
268
269
270@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 2

mkdirMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected