diff --git a/geopandas/tests/test_geom_methods.py b/geopandas/tests/test_geom_methods.py index e824a31..10677e3 100644 --- a/geopandas/tests/test_geom_methods.py +++ b/geopandas/tests/test_geom_methods.py @@ -64,7 +64,6 @@ class TestGeomMethods: self.g5 = GeoSeries([self.l1, self.l2]) self.g6 = GeoSeries([self.p0, self.t3]) self.empty = GeoSeries([]) - self.empty.crs = {'init': 'epsg:4326', 'no_defs': True} self.empty_poly = Polygon() # Crossed lines diff --git a/geopandas/tests/test_plotting.py b/geopandas/tests/test_plotting.py index 3d86659..cf370c0 100644 --- a/geopandas/tests/test_plotting.py +++ b/geopandas/tests/test_plotting.py @@ -400,8 +400,10 @@ class TestPySALPlotting: cls.df['NEGATIVES'] = np.linspace(-10, 10, len(cls.df.index)) def test_legend(self): - ax = self.df.plot(column='CRIME', scheme='QUANTILES', k=3, - cmap='OrRd', legend=True) + with warnings.catch_warnings(record=True) as _: # don't print warning + # warning coming from pysal / scipy.stats + ax = self.df.plot(column='CRIME', scheme='QUANTILES', k=3, + cmap='OrRd', legend=True) labels = [t.get_text() for t in ax.get_legend().get_texts()] expected = [u'0.18 - 26.07', u'26.07 - 41.97', u'41.97 - 68.89'] assert labels == expected diff --git a/geopandas/tests/test_types.py b/geopandas/tests/test_types.py index 2729dee..fe71051 100644 --- a/geopandas/tests/test_types.py +++ b/geopandas/tests/test_types.py @@ -1,5 +1,7 @@ from __future__ import absolute_import +import warnings + from pandas import Series, DataFrame from shapely.geometry import Point @@ -42,7 +44,10 @@ class TestSeries: assert type(self.pts.take(list(range(0, self.N, 2)))) is GeoSeries def test_select(self): - assert type(self.pts.select(lambda x: x % 2 == 0)) is GeoSeries + with warnings.catch_warnings(record=True) as _: + # depending on pandas version this raises FutureWarning -> + # suppress it + assert type(self.pts.select(lambda x: x % 2 == 0)) is GeoSeries def test_groupby(self): for f, s in self.pts.groupby(lambda x: x % 2):