From 3f2a4ec0cd769cbc08dd6bc6d988b6c8b7953c8e Mon Sep 17 00:00:00 2001 From: Kelsey Jordahl Date: Tue, 17 Nov 2015 21:09:10 -0700 Subject: [PATCH] TST CLN: Use assert_isinstance from pandas instead of redefining it --- geopandas/tests/util.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/geopandas/tests/util.py b/geopandas/tests/util.py index c700442..12469b1 100644 --- a/geopandas/tests/util.py +++ b/geopandas/tests/util.py @@ -1,7 +1,9 @@ import io import os.path import sys + from six.moves.urllib.request import urlopen +from pandas.util.testing import assert_isinstance from geopandas import GeoDataFrame, GeoSeries @@ -151,13 +153,6 @@ def geom_almost_equals(this, that): return (this.geom_almost_equals(that) | (this.is_empty & that.is_empty)).all() -# TODO: Remove me when standardizing on pandas 0.13, which already includes -# this test util. -def assert_isinstance(obj, klass_or_tuple): - assert isinstance(obj, klass_or_tuple), "type: %r != %r" % ( - type(obj).__name__, - getattr(klass_or_tuple, '__name__', - klass_or_tuple)) def assert_geoseries_equal(left, right, check_dtype=False, check_index_type=False,