You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Long-form exists but is not given, and short-form is given.
73
-
withpytest.warns(
74
-
SyntaxWarning,
75
-
match="Short-form parameter 'U' is not recommended. Use long-form parameter 'label', 'text' instead.",
76
-
):
73
+
msg=(
74
+
r"Short-form parameter 'U' is not recommended. Use long-form parameters 'label', with optional parameters 'text' \(\+t\) instead.",
75
+
)
76
+
withpytest.warns(SyntaxWarning, match=msg):
77
77
assertfunc(U="abcd+tefg") == ["-Uabcd+tefg"]
78
78
79
79
# Coexistence of long-form and short-form parameters.
80
-
withpytest.raises(
81
-
GMTInvalidInput,
82
-
match="Parameter in short-form 'U' conflicts with long-form parameter 'label', 'text'.",
83
-
):
80
+
msg=r"Short-form parameter 'U' conflicts with long-form parameters and is not recommended. Use long-form parameters 'label', with optional parameters 'text' \(\+t\) instead."
81
+
withpytest.raises(GMTInvalidInput, match=msg):
84
82
func(label="abcd", U="efg")
85
83
86
-
withpytest.raises(
87
-
GMTInvalidInput,
88
-
match="Parameter in short-form 'U' conflicts with long-form parameter 'label', 'text'.",
0 commit comments