From 8838d4dd498c8f66ea4237fe8a79a5f77d6f95c9 Mon Sep 17 00:00:00 2001 From: Vytis Banaitis Date: Wed, 1 Feb 2017 18:41:56 +0200 Subject: Refs #23919 -- Replaced kwargs.pop() with keyword-only arguments. --- tests/gis_tests/test_data.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'tests/gis_tests/test_data.py') diff --git a/tests/gis_tests/test_data.py b/tests/gis_tests/test_data.py index adcd57b48b..c1e1f5efec 100644 --- a/tests/gis_tests/test_data.py +++ b/tests/gis_tests/test_data.py @@ -43,9 +43,8 @@ class TestDS(TestObj): """ Object for testing GDAL data sources. """ - def __init__(self, name, **kwargs): + def __init__(self, name, *, ext='shp', **kwargs): # Shapefile is default extension, unless specified otherwise. - ext = kwargs.pop('ext', 'shp') self.ds = get_ds_file(name, ext) super().__init__(**kwargs) @@ -55,19 +54,14 @@ class TestGeom(TestObj): Testing object used for wrapping reference geometry data in GEOS/GDAL tests. """ - def __init__(self, **kwargs): + def __init__(self, *, coords=None, centroid=None, ext_ring_cs=None, **kwargs): # Converting lists to tuples of certain keyword args # so coordinate test cases will match (JSON has no # concept of tuple). - coords = kwargs.pop('coords', None) if coords: self.coords = tuplize(coords) - - centroid = kwargs.pop('centroid', None) if centroid: self.centroid = tuple(centroid) - - ext_ring_cs = kwargs.pop('ext_ring_cs', None) if ext_ring_cs: ext_ring_cs = tuplize(ext_ring_cs) self.ext_ring_cs = ext_ring_cs -- cgit v1.3