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

Function data_dir

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

Source from the content-addressed store, hash-verified

81
82@pytest.fixture
83def data_dir(tmp_path):
84 data_dir = tmp_path / "data_dir"
85 data_dir.mkdir()
86 with open(data_dir / "train.txt", "w") as f:
87 f.write("foo\n" * 10)
88 with open(data_dir / "test.txt", "w") as f:
89 f.write("bar\n" * 10)
90 return str(data_dir)
91
92
93@pytest.fixture

Callers

nothing calls this directly

Calls 2

mkdirMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected