File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -186,6 +186,18 @@ def _validate(self):
186186 description = "reference point" ,
187187 reason = "Expect a valid 2-character justification code." ,
188188 )
189+ case _:
190+ raise GMTValueError (
191+ self .cstype ,
192+ description = "cstype" ,
193+ choices = [
194+ "mapcoords" ,
195+ "plotcoords" ,
196+ "boxcoords" ,
197+ "inside" ,
198+ "outside" ,
199+ ],
200+ )
189201 # Validate the anchor if specified.
190202 if self .anchor is not None and self .anchor not in _valid_anchors :
191203 raise GMTValueError (
Original file line number Diff line number Diff line change @@ -37,6 +37,8 @@ def test_params_position_invalid_location():
3737 """
3838 Test that invalid location inputs raise GMTValueError.
3939 """
40+ with pytest .raises (GMTValueError ):
41+ Position ((1 , 2 ), cstype = "invalid" )
4042 with pytest .raises (GMTValueError ):
4143 Position ("invalid" , cstype = "mapcoords" )
4244 with pytest .raises (GMTValueError ):
You can’t perform that action at this time.
0 commit comments