summaryrefslogtreecommitdiff
path: root/tests/gis_tests
diff options
context:
space:
mode:
authorVytis Banaitis <vytis.banaitis@gmail.com>2017-02-01 18:41:56 +0200
committerTim Graham <timograham@gmail.com>2017-02-01 11:41:56 -0500
commit8838d4dd498c8f66ea4237fe8a79a5f77d6f95c9 (patch)
treeb75fa27930b8758ad36669b523b084ac09ce290b /tests/gis_tests
parent0ec4dc91e0e7befdd06aa0613b5d0fbe3c785ee7 (diff)
Refs #23919 -- Replaced kwargs.pop() with keyword-only arguments.
Diffstat (limited to 'tests/gis_tests')
-rw-r--r--tests/gis_tests/geos_tests/test_geos.py3
-rw-r--r--tests/gis_tests/test_data.py10
2 files changed, 3 insertions, 10 deletions
diff --git a/tests/gis_tests/geos_tests/test_geos.py b/tests/gis_tests/geos_tests/test_geos.py
index c90927c5cc..bb3341493c 100644
--- a/tests/gis_tests/geos_tests/test_geos.py
+++ b/tests/gis_tests/geos_tests/test_geos.py
@@ -1258,8 +1258,7 @@ class GEOSTest(SimpleTestCase, TestDataMixin):
to the parent class during `__init__`.
"""
class ExtendedPolygon(Polygon):
- def __init__(self, *args, **kwargs):
- data = kwargs.pop('data', 0)
+ def __init__(self, *args, data=0, **kwargs):
super().__init__(*args, **kwargs)
self._data = data
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