| 730 | @pytest.mark.slow |
| 731 | @pytest.mark.parametrize("compression", ["infer", "gzip"]) |
| 732 | def test_compression_multiple_files(compression): |
| 733 | with tmpdir() as tdir: |
| 734 | f = gzip.open(os.path.join(tdir, "a.csv.gz"), "wb") |
| 735 | f.write(csv_text.encode()) |
| 736 | f.close() |
| 737 | |
| 738 | f = gzip.open(os.path.join(tdir, "b.csv.gz"), "wb") |
| 739 | f.write(csv_text.encode()) |
| 740 | f.close() |
| 741 | |
| 742 | with pytest.warns(UserWarning): |
| 743 | df = dd.read_csv(os.path.join(tdir, "*.csv.gz"), compression=compression) |
| 744 | |
| 745 | assert len(df.compute()) == (len(csv_text.split("\n")) - 1) * 2 |
| 746 | |
| 747 | |
| 748 | def test_empty_csv_file(): |