(df, npartitions)
| 66 | ) |
| 67 | @pytest.mark.parametrize("npartitions", [2, 20]) |
| 68 | def test_basic(df, npartitions): |
| 69 | ddf = dd.from_pandas(df, npartitions=npartitions) |
| 70 | |
| 71 | approx = ddf.nunique_approx().compute(scheduler="sync") |
| 72 | exact = len(df.drop_duplicates()) |
| 73 | assert abs(approx - exact) <= 2 or abs(approx - exact) / exact < 0.05 |
| 74 | |
| 75 | |
| 76 | @pytest.mark.parametrize("split_every", [None, 2, 10]) |
nothing calls this directly
no test coverage detected