Skip to content

Commit

Permalink
Merge 879c9e4 into 2fe0630
Browse files Browse the repository at this point in the history
  • Loading branch information
snowman2 committed Aug 20, 2019
2 parents 2fe0630 + 879c9e4 commit ab3226d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 24 deletions.
2 changes: 1 addition & 1 deletion test/test_doctest_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def test_doctests():
try:
import shapely # noqa
except ImportError:
if os.name == "nt":
if os.name == "nt" or os.environ.get("PLAT") == "i686":
expected_failure_count = 6

# if the below line fails, doctests have failed
Expand Down
47 changes: 24 additions & 23 deletions test/test_geod.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@
SHAPELY_LOADED = False


skip_shapely_windows = pytest.mark.skipif(
not SHAPELY_LOADED and os.name == "nt", reason="Missing shapely wheels for Windows."
skip_shapely = pytest.mark.skipif(
not SHAPELY_LOADED and (os.name == "nt" or os.environ.get("PLAT") == "i686"),
reason="Missing shapely wheels for Windows.",
)


Expand Down Expand Up @@ -171,13 +172,13 @@ def test_polygon_area_perimeter__single_point():
assert perimeter == 0


@skip_shapely_windows
@skip_shapely
def test_geometry_length__point():
geod = Geod(ellps="WGS84")
assert geod.geometry_length(Point(1, 2)) == 0


@skip_shapely_windows
@skip_shapely
def test_geometry_length__linestring():
geod = Geod(ellps="WGS84")
assert_almost_equal(
Expand All @@ -187,7 +188,7 @@ def test_geometry_length__linestring():
)


@skip_shapely_windows
@skip_shapely
def test_geometry_length__linestring__radians():
geod = Geod(ellps="WGS84")
assert_almost_equal(
Expand All @@ -205,7 +206,7 @@ def test_geometry_length__linestring__radians():
)


@skip_shapely_windows
@skip_shapely
def test_geometry_length__linearring():
geod = Geod(ellps="WGS84")
assert_almost_equal(
Expand All @@ -217,7 +218,7 @@ def test_geometry_length__linearring():
)


@skip_shapely_windows
@skip_shapely
def test_geometry_length__polygon():
geod = Geod(ellps="WGS84")
assert_almost_equal(
Expand All @@ -229,7 +230,7 @@ def test_geometry_length__polygon():
)


@skip_shapely_windows
@skip_shapely
def test_geometry_length__polygon__radians():
geod = Geod(ellps="WGS84")
assert_almost_equal(
Expand All @@ -250,7 +251,7 @@ def test_geometry_length__polygon__radians():
)


@skip_shapely_windows
@skip_shapely
def test_geometry_length__multipolygon():
geod = Geod(ellps="WGS84")
polygon = Polygon(LineString([Point(1, 2), Point(3, 4), Point(5, 2)]))
Expand All @@ -261,7 +262,7 @@ def test_geometry_length__multipolygon():
)


@skip_shapely_windows
@skip_shapely
def test_geometry_length__multipolygon__radians():
geod = Geod(ellps="WGS84")
polygon = Polygon(
Expand All @@ -280,7 +281,7 @@ def test_geometry_length__multipolygon__radians():
)


@skip_shapely_windows
@skip_shapely
def test_geometry_length__multilinestring():
geod = Geod(ellps="WGS84")
line_string = LineString([Point(1, 2), Point(3, 4), Point(5, 2)])
Expand All @@ -291,21 +292,21 @@ def test_geometry_length__multilinestring():
)


@skip_shapely_windows
@skip_shapely
def test_geometry_length__multipoint():
geod = Geod(ellps="WGS84")
assert (
geod.geometry_length(MultiPoint([Point(1, 2), Point(3, 4), Point(5, 2)])) == 0
)


@skip_shapely_windows
@skip_shapely
def test_geometry_area_perimeter__point():
geod = Geod(ellps="WGS84")
assert geod.geometry_area_perimeter(Point(1, 2)) == (0, 0)


@skip_shapely_windows
@skip_shapely
def test_geometry_area_perimeter__linestring():
geod = Geod(ellps="WGS84")
assert_almost_equal(
Expand All @@ -315,7 +316,7 @@ def test_geometry_area_perimeter__linestring():
)


@skip_shapely_windows
@skip_shapely
def test_geometry_area_perimeter__linestring__radians():
geod = Geod(ellps="WGS84")
assert_almost_equal(
Expand All @@ -333,7 +334,7 @@ def test_geometry_area_perimeter__linestring__radians():
)


@skip_shapely_windows
@skip_shapely
def test_geometry_area_perimeter__linearring():
geod = Geod(ellps="WGS84")
assert_almost_equal(
Expand All @@ -345,7 +346,7 @@ def test_geometry_area_perimeter__linearring():
)


@skip_shapely_windows
@skip_shapely
def test_geometry_area_perimeter__polygon():
geod = Geod(ellps="WGS84")
assert_almost_equal(
Expand All @@ -357,7 +358,7 @@ def test_geometry_area_perimeter__polygon():
)


@skip_shapely_windows
@skip_shapely
def test_geometry_area_perimeter__polygon__radians():
geod = Geod(ellps="WGS84")
assert_almost_equal(
Expand All @@ -378,7 +379,7 @@ def test_geometry_area_perimeter__polygon__radians():
)


@skip_shapely_windows
@skip_shapely
def test_geometry_area_perimeter__polygon__holes():
geod = Geod(ellps="WGS84")
assert_almost_equal(
Expand All @@ -393,7 +394,7 @@ def test_geometry_area_perimeter__polygon__holes():
)


@skip_shapely_windows
@skip_shapely
def test_geometry_area_perimeter__multipolygon():
geod = Geod(ellps="WGS84")
polygon = Polygon(LineString([Point(1, 2), Point(3, 4), Point(5, 2)]))
Expand All @@ -404,7 +405,7 @@ def test_geometry_area_perimeter__multipolygon():
)


@skip_shapely_windows
@skip_shapely
def test_geometry_area_perimeter__multipolygon__radians():
geod = Geod(ellps="WGS84")
polygon = Polygon(
Expand All @@ -423,7 +424,7 @@ def test_geometry_area_perimeter__multipolygon__radians():
)


@skip_shapely_windows
@skip_shapely
def test_geometry_area_perimeter__multilinestring():
geod = Geod(ellps="WGS84")
line_string = LineString([Point(1, 2), Point(3, 4), Point(5, 2)])
Expand All @@ -434,7 +435,7 @@ def test_geometry_area_perimeter__multilinestring():
)


@skip_shapely_windows
@skip_shapely
def test_geometry_area_perimeter__multipoint():
geod = Geod(ellps="WGS84")
assert geod.geometry_area_perimeter(
Expand Down

0 comments on commit ab3226d

Please sign in to comment.