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

Function test_dataset_to_csv_fsspec

tests/io/test_csv.py:168–175  ·  view source on GitHub ↗
(dataset, mockfs)

Source from the content-addressed store, hash-verified

166
167
168def test_dataset_to_csv_fsspec(dataset, mockfs):
169 dataset_path = "mock://my_dataset.csv"
170 writer = CsvDatasetWriter(dataset, dataset_path, storage_options=mockfs.storage_options)
171 assert writer.write() > 0
172 assert mockfs.isfile(dataset_path)
173
174 with fsspec.open(dataset_path, "rb", **mockfs.storage_options) as f:
175 assert f.read()

Callers

nothing calls this directly

Calls 4

writeMethod · 0.95
CsvDatasetWriterClass · 0.90
openMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected