@@ -79,6 +79,20 @@ def test_validate_post_history_valid(body: str):
79
79
assert warnings == [], warnings
80
80
81
81
82
+ @pytest .mark .parametrize (
83
+ "body" ,
84
+ [
85
+ "31-Jul-2015 <https://discuss.python.org/t/123456>`__," ,
86
+ "`31-Jul-2015 <https://discuss.python.org/t/123456>" ,
87
+ ],
88
+ )
89
+ def test_validate_post_history_unbalanced_link (body : str ):
90
+ warnings = [warning for (_ , warning ) in check_peps ._validate_post_history (1 , body )]
91
+ assert warnings == [
92
+ "post line must be a date or both start with “`” and end with “>`__”"
93
+ ], warnings
94
+
95
+
82
96
@pytest .mark .parametrize (
83
97
"line" ,
84
98
[
@@ -118,6 +132,20 @@ def test_validate_resolution_invalid(line: str):
118
132
assert warnings == ["Resolution must be a valid thread URL" ], warnings
119
133
120
134
135
+ @pytest .mark .parametrize (
136
+ "line" ,
137
+ [
138
+ "01-Jan-2000 <https://mail.python.org/pipermail/list-name/0000-Month/0123456.html>`__" ,
139
+ "`01-Jan-2000 <https://mail.python.org/pipermail/list-name/0000-Month/0123456.html>" ,
140
+ ],
141
+ )
142
+ def test_validate_resolution_unbalanced_link (line : str ):
143
+ warnings = [warning for (_ , warning ) in check_peps ._validate_resolution (1 , line )]
144
+ assert warnings == [
145
+ "Resolution line must be a link or both start with “`” and end with “>`__”"
146
+ ], warnings
147
+
148
+
121
149
@pytest .mark .parametrize (
122
150
"thread_url" ,
123
151
[
0 commit comments