| 714 | @pytest.mark.slow |
| 715 | @pytest.mark.parametrize("compression", ["infer", "gzip"]) |
| 716 | def 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 | |
| 732 | def test_empty_csv_file(): |