Skip to content

Commit

Permalink
TST: remove filterwarnings for numpy 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche committed Feb 4, 2022
1 parent f6185ee commit 991f4e6
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 12 deletions.
1 change: 0 additions & 1 deletion shapely/tests/geometry/test_collection.py
Expand Up @@ -78,7 +78,6 @@ def test_len_raises(geometrycollection_geojson):
len(geom)


@pytest.mark.filterwarnings("error:An exception was ignored") # NumPy 1.21
def test_numpy_object_array():
geom = GeometryCollection([LineString([(0, 0), (1, 1)])])
ar = np.empty(1, object)
Expand Down
2 changes: 0 additions & 2 deletions shapely/tests/geometry/test_emptiness.py
@@ -1,5 +1,4 @@
import numpy as np
import pytest

from shapely.geometry import (
GeometryCollection,
Expand Down Expand Up @@ -63,7 +62,6 @@ def test_empty_linear_ring(self):
assert LinearRing(empty_generator()).is_empty


@pytest.mark.filterwarnings("error:An exception was ignored") # NumPy 1.21
def test_numpy_object_array():
geoms = [BaseGeometry(), EmptyGeometry()]
arr = np.empty(2, object)
Expand Down
2 changes: 0 additions & 2 deletions shapely/tests/geometry/test_linestring.py
Expand Up @@ -85,7 +85,6 @@ def test_from_numpy():
assert line.coords[:] == [(1.0, 2.0), (3.0, 4.0)]


@pytest.mark.filterwarnings("error:An exception was ignored") # NumPy 1.21
def test_numpy_empty_linestring_coords():
# Check empty
line = LineString([])
Expand All @@ -94,7 +93,6 @@ def test_numpy_empty_linestring_coords():
assert la.shape == (0, 2)


@pytest.mark.filterwarnings("error:An exception was ignored") # NumPy 1.21
def test_numpy_object_array():
geom = LineString([(0.0, 0.0), (0.0, 1.0)])
ar = np.empty(1, object)
Expand Down
1 change: 0 additions & 1 deletion shapely/tests/geometry/test_multilinestring.py
Expand Up @@ -72,7 +72,6 @@ def test_create_multi_with_empty_component(self):
MultiLineString([LineString([(0, 0), (1, 1), (2, 2)]), LineString()]).wkt


@pytest.mark.filterwarnings("error:An exception was ignored") # NumPy 1.21
def test_numpy_object_array():
geom = MultiLineString([[[5.0, 6.0], [7.0, 8.0]]])
ar = np.empty(1, object)
Expand Down
1 change: 0 additions & 1 deletion shapely/tests/geometry/test_multipoint.py
Expand Up @@ -66,7 +66,6 @@ def test_multipoint_array_coercion():
assert arr.item() == geom


@pytest.mark.filterwarnings("error:An exception was ignored") # NumPy 1.21
def test_numpy_object_array():
geom = MultiPoint(((1.0, 2.0), (3.0, 4.0)))
ar = np.empty(1, object)
Expand Down
1 change: 0 additions & 1 deletion shapely/tests/geometry/test_multipolygon.py
Expand Up @@ -107,7 +107,6 @@ def test_fail_list_of_multipolygons():
MultiPolygon([multi])


@pytest.mark.filterwarnings("error:An exception was ignored") # NumPy 1.21
def test_numpy_object_array():
geom = MultiPolygon(
[
Expand Down
2 changes: 0 additions & 2 deletions shapely/tests/geometry/test_point.py
Expand Up @@ -160,7 +160,6 @@ def test_point_array_coercion():
assert arr.item() == p


@pytest.mark.filterwarnings("error:An exception was ignored") # NumPy 1.21
def test_numpy_empty_point_coords():
pe = Point()

Expand All @@ -169,7 +168,6 @@ def test_numpy_empty_point_coords():
assert a.shape == (0, 2)


@pytest.mark.filterwarnings("error:An exception was ignored") # NumPy 1.21
def test_numpy_object_array():
geom = Point(3.0, 4.0)
ar = np.empty(1, object)
Expand Down
2 changes: 0 additions & 2 deletions shapely/tests/geometry/test_polygon.py
Expand Up @@ -102,13 +102,11 @@ def test_numpy_linearring_coords():
assert_array_equal(ra, expected)


@pytest.mark.filterwarnings("error:An exception was ignored") # NumPy 1.21
def test_numpy_empty_linearring_coords():
ring = LinearRing()
assert np.asarray(ring.coords).shape == (0, 2)


@pytest.mark.filterwarnings("error:An exception was ignored") # NumPy 1.21
def test_numpy_object_array():
geom = Polygon([(0.0, 0.0), (0.0, 1.0), (1.0, 1.0)])
ar = np.empty(1, object)
Expand Down

0 comments on commit 991f4e6

Please sign in to comment.