diff --git a/harmony/harmony.py b/harmony/harmony.py index fb7953d..5082064 100644 --- a/harmony/harmony.py +++ b/harmony/harmony.py @@ -151,16 +151,16 @@ def __repr__(self) -> str: class WKT: - """The WKT represntation of Spatial.""" + """The Well Known Text (WKT) representation of Spatial.""" def __init__(self, wkt: str): - """Constructs a WKT of spatial area. + """Constructs a WKT instance of spatial area. Args: - wkt: WKT string + wkt: the WKT string Returns: - A WKT + A WKT instance """ self.wkt = wkt @@ -382,7 +382,7 @@ def __init__(self, 'variables': 'parameter-name' } self.spatial_validations = [ - (lambda s: is_wkt_valid(s.wkt), f'WKT {spatial.wkt} is not valid'), + (lambda s: is_wkt_valid(s.wkt), f'WKT {spatial.wkt} is invalid'), ] else: self.variable_name_to_query_param = { diff --git a/tests/test_request.py b/tests/test_request.py index 77ada83..7ad08f0 100644 --- a/tests/test_request.py +++ b/tests/test_request.py @@ -165,9 +165,9 @@ def test_request_dimensions_error_messages(value): assert message in messages @pytest.mark.parametrize('key, value, message', [ - ('spatial', WKT('BBOX(-140,20,-50,60)'), 'WKT BBOX(-140,20,-50,60) is not valid'), - ('spatial', WKT('APOINT(0 51.48)'), 'WKT APOINT(0 51.48) is not valid'), - ('spatial', WKT('CIRCULARSTRING(0 0, 1 1, 1 0)'), 'WKT CIRCULARSTRING(0 0, 1 1, 1 0) is not valid'), + ('spatial', WKT('BBOX(-140,20,-50,60)'), 'WKT BBOX(-140,20,-50,60) is invalid'), + ('spatial', WKT('APOINT(0 51.48)'), 'WKT APOINT(0 51.48) is invalid'), + ('spatial', WKT('CIRCULARSTRING(0 0, 1 1, 1 0)'), 'WKT CIRCULARSTRING(0 0, 1 1, 1 0) is invalid'), ]) def test_request_spatial_error_messages(key, value, message): request = Request(Collection('foo'), **{key: value})