|
4 | 4 | import numpy as np
|
5 | 5 | import geopandas
|
6 | 6 | from shapely.geometry import Polygon, Point, LineString, MultiPoint
|
| 7 | +import dask |
7 | 8 | import dask.dataframe as dd
|
8 | 9 | from dask.dataframe.core import Scalar
|
9 | 10 | import dask_geopandas
|
@@ -546,12 +547,30 @@ def test_sum(self):
|
546 | 547 | gpd_sum, dd_sum.drop(columns=["name", "iso_a3"]), check_like=True
|
547 | 548 | )
|
548 | 549 |
|
| 550 | + @pytest.mark.skipif( |
| 551 | + Version(dask.__version__) == Version("2022.01.1"), |
| 552 | + reason="Regression in dask 2022.01.1 https://github.com/dask/dask/issues/8611", |
| 553 | + ) |
549 | 554 | def test_split_out(self):
|
550 | 555 | gpd_default = self.world.dissolve("continent")
|
551 | 556 | dd_split = self.ddf.dissolve("continent", split_out=4)
|
552 | 557 | assert dd_split.npartitions == 4
|
553 | 558 | assert_geodataframe_equal(gpd_default, dd_split.compute(), check_like=True)
|
554 | 559 |
|
| 560 | + @pytest.mark.skipif( |
| 561 | + Version(dask.__version__) == Version("2022.01.1"), |
| 562 | + reason="Regression in dask 2022.01.1 https://github.com/dask/dask/issues/8611", |
| 563 | + ) |
| 564 | + @pytest.mark.xfail |
| 565 | + def test_split_out_name(self): |
| 566 | + gpd_default = self.world.rename_geometry("geom").dissolve("continent") |
| 567 | + ddf = dask_geopandas.from_geopandas( |
| 568 | + self.world.rename_geometry("geom"), npartitions=4 |
| 569 | + ) |
| 570 | + dd_split = ddf.dissolve("continent", split_out=4) |
| 571 | + assert dd_split.npartitions == 4 |
| 572 | + assert_geodataframe_equal(gpd_default, dd_split.compute(), check_like=True) |
| 573 | + |
555 | 574 | def test_dict(self):
|
556 | 575 | aggfunc = {
|
557 | 576 | "pop_est": "min",
|
|
0 commit comments