(self, func)
| 595 | |
| 596 | @pytest.mark.parametrize("func", ["first", "last"]) |
| 597 | def test_groupby_first_last(self, func): |
| 598 | method = operator.methodcaller(func) |
| 599 | u = self.eager_array |
| 600 | v = self.lazy_array |
| 601 | |
| 602 | for coords in [u.coords, v.coords]: |
| 603 | coords["ab"] = ("x", ["a", "a", "b", "b"]) |
| 604 | expected = method(u.groupby("ab")) |
| 605 | |
| 606 | with raise_if_dask_computes(): |
| 607 | actual = method(v.groupby("ab")) |
| 608 | self.assertLazyAndAllClose(expected, actual) |
| 609 | |
| 610 | with raise_if_dask_computes(): |
| 611 | actual = method(v.groupby("ab")) |
| 612 | self.assertLazyAndAllClose(expected, actual) |
| 613 | |
| 614 | def test_reindex(self): |
| 615 | u = self.eager_array.assign_coords(y=range(6)) |
nothing calls this directly
no test coverage detected