(df, pdf)
| 215 | |
| 216 | |
| 217 | def test_unique_base(df, pdf): |
| 218 | with pytest.raises( |
| 219 | AttributeError, match="'DataFrame' object has no attribute 'unique'" |
| 220 | ): |
| 221 | df.unique() |
| 222 | |
| 223 | # pandas returns a numpy array while we return a Series/Index |
| 224 | assert_eq(df.x.unique(), pd.Series(pdf.x.unique(), name="x"), check_index=False) |
| 225 | assert_eq(df.index.unique(split_out=1), pd.Index(pdf.index.unique())) |
| 226 | np.testing.assert_array_equal( |
| 227 | df.index.unique().compute().sort_values().values, |
| 228 | pd.Index(pdf.index.unique()).values, |
| 229 | ) |
| 230 | |
| 231 | |
| 232 | def test_value_counts_split_out_normalize(df, pdf): |
nothing calls this directly
no test coverage detected
searching dependent graphs…