diff options
| author | Vytis Banaitis <vytis.banaitis@gmail.com> | 2017-02-01 18:41:56 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-02-01 11:41:56 -0500 |
| commit | 8838d4dd498c8f66ea4237fe8a79a5f77d6f95c9 (patch) | |
| tree | b75fa27930b8758ad36669b523b084ac09ce290b /tests/gis_tests/test_data.py | |
| parent | 0ec4dc91e0e7befdd06aa0613b5d0fbe3c785ee7 (diff) | |
Refs #23919 -- Replaced kwargs.pop() with keyword-only arguments.
Diffstat (limited to 'tests/gis_tests/test_data.py')
| -rw-r--r-- | tests/gis_tests/test_data.py | 10 |
1 files changed, 2 insertions, 8 deletions
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 |
