From d98318948c8c69cd198808ff2ce4289bfbf0df22 Mon Sep 17 00:00:00 2001 From: Christopher Ren Date: Sat, 27 Jan 2018 09:07:22 +0000 Subject: [PATCH] TST: parametrized test_datasets.py tests (#646) --- geopandas/tests/test_datasets.py | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/geopandas/tests/test_datasets.py b/geopandas/tests/test_datasets.py index b34022b..23f75cb 100644 --- a/geopandas/tests/test_datasets.py +++ b/geopandas/tests/test_datasets.py @@ -1,18 +1,13 @@ from __future__ import absolute_import +import pytest + from geopandas import read_file, GeoDataFrame from geopandas.datasets import get_path - -class TestDatasets: - - def test_read_paths(self): - - gdf = read_file(get_path('naturalearth_lowres')) - assert isinstance(gdf, GeoDataFrame) - - gdf = read_file(get_path('naturalearth_cities')) - assert isinstance(gdf, GeoDataFrame) - - gdf = read_file(get_path('nybb')) - assert isinstance(gdf, GeoDataFrame) +@pytest.mark.parametrize("test_dataset", + ['naturalearth_lowres', + 'naturalearth_cities', + 'nybb']) +def test_read_paths(test_dataset): + assert isinstance(read_file(get_path(test_dataset)), GeoDataFrame)