Skip to content

Commit

Permalink
TST: adapt tests to GEOS 3.12 (#509)
Browse files Browse the repository at this point in the history
* TST: adapt tests to GEOS 3.12

* fix the value
  • Loading branch information
martinfleis authored Aug 21, 2023
1 parent 4f1176a commit cccff59
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions momepy/tests/test_distribution.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import geopandas as gpd
import numpy as np
import pytest
import shapely
from packaging.version import Version
from libpysal.weights import Queen

import momepy as mm
Expand Down Expand Up @@ -120,8 +122,11 @@ def test_Alignment(self):
self.df_buildings["align_sw"] = mm.Alignment(
self.df_buildings, sw, "uID", self.df_buildings["orient"]
).series
# GH#457 (`minimum_rotated_rectangle` calculation update)
test_value = 22.744936872392813
test_value = (
22.744936872392813
if Version(shapely.geos_version_string) < Version("3.12")
else 18.29842494
)
assert self.df_buildings["align_sw"][0] == pytest.approx(test_value)
sw_drop = Queen.from_dataframe(self.df_tessellation[2:], ids="uID")
assert (
Expand Down

0 comments on commit cccff59

Please sign in to comment.