(split_every, npartitions)
| 76 | @pytest.mark.parametrize("split_every", [None, 2, 10]) |
| 77 | @pytest.mark.parametrize("npartitions", [2, 20]) |
| 78 | def test_split_every(split_every, npartitions): |
| 79 | df = pd.Series([1, 2, 3] * 1000) |
| 80 | ddf = dd.from_pandas(df, npartitions=npartitions) |
| 81 | |
| 82 | approx = ddf.nunique_approx(split_every=split_every).compute(scheduler="sync") |
| 83 | exact = len(df.drop_duplicates()) |
| 84 | assert abs(approx - exact) <= 2 or abs(approx - exact) / exact < 0.05 |
| 85 | |
| 86 | |
| 87 | def test_larger_data(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…