MCPcopy
hub / github.com/dask/dask / test_compression_multiple_files

Function test_compression_multiple_files

dask/dataframe/io/tests/test_csv.py:716–729  ·  view source on GitHub ↗
(compression)

Source from the content-addressed store, hash-verified

714@pytest.mark.slow
715@pytest.mark.parametrize("compression", ["infer", "gzip"])
716def test_compression_multiple_files(compression):
717 with tmpdir() as tdir:
718 f = gzip.open(os.path.join(tdir, "a.csv.gz"), "wb")
719 f.write(csv_text.encode())
720 f.close()
721
722 f = gzip.open(os.path.join(tdir, "b.csv.gz"), "wb")
723 f.write(csv_text.encode())
724 f.close()
725
726 with pytest.warns(UserWarning):
727 df = dd.read_csv(os.path.join(tdir, "*.csv.gz"), compression=compression)
728
729 assert len(df.compute()) == (len(csv_text.split("\n")) - 1) * 2
730
731
732def test_empty_csv_file():

Callers

nothing calls this directly

Calls 6

tmpdirFunction · 0.90
closeMethod · 0.80
read_csvMethod · 0.80
splitMethod · 0.80
joinMethod · 0.45
computeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…