@@ -103,32 +103,57 @@ def test_tweak_patchlevel(tmp_path: Path) -> None:
103103
104104
105105@pytest .mark .parametrize (
106- ["test_tag" , "expected_version" , "expected_underline" ],
106+ [
107+ "test_tag" ,
108+ "expected_version" ,
109+ "expected_underline" ,
110+ "expected_whatsnew" ,
111+ "expected_docs" ,
112+ "expected_pep_line" ,
113+ ],
107114 [
108115 (
109116 "3.14.0a6" ,
110117 "This is Python version 3.14.0 alpha 6" ,
111118 "=====================================" ,
119+ "3.14 <https://docs.python.org/3.14/whatsnew/3.14.html>`_" ,
120+ "`Documentation for Python 3.14 <https://docs.python.org/3.14/>`_" ,
121+ "`PEP 745 <https://peps.python.org/pep-0745/>`__ for Python 3.14" ,
112122 ),
113123 (
114124 "3.14.0b2" ,
115125 "This is Python version 3.14.0 beta 2" ,
116126 "====================================" ,
127+ "3.14 <https://docs.python.org/3.14/whatsnew/3.14.html>`_" ,
128+ "`Documentation for Python 3.14 <https://docs.python.org/3.14/>`_" ,
129+ "`PEP 745 <https://peps.python.org/pep-0745/>`__ for Python 3.14" ,
117130 ),
118131 (
119132 "3.14.0rc2" ,
120133 "This is Python version 3.14.0 release candidate 2" ,
121134 "=================================================" ,
135+ "3.14 <https://docs.python.org/3.14/whatsnew/3.14.html>`_" ,
136+ "`Documentation for Python 3.14 <https://docs.python.org/3.14/>`_" ,
137+ "`PEP 745 <https://peps.python.org/pep-0745/>`__ for Python 3.14" ,
122138 ),
123139 (
124- "3.14 .1" ,
125- "This is Python version 3.14 .1" ,
140+ "3.15 .1" ,
141+ "This is Python version 3.15 .1" ,
126142 "=============================" ,
143+ "3.15 <https://docs.python.org/3.15/whatsnew/3.15.html>`_" ,
144+ "`Documentation for Python 3.15 <https://docs.python.org/3.15/>`_" ,
145+ "`PEP 790 <https://peps.python.org/pep-0790/>`__ for Python 3.15" ,
127146 ),
128147 ],
129148)
130149def test_tweak_readme (
131- tmp_path : Path , test_tag : str , expected_version : str , expected_underline : str
150+ tmp_path : Path ,
151+ test_tag : str ,
152+ expected_version : str ,
153+ expected_underline : str ,
154+ expected_whatsnew : str ,
155+ expected_docs : str ,
156+ expected_pep_line : str ,
132157) -> None :
133158 # Arrange
134159 tag = release .Tag (test_tag )
@@ -142,11 +167,12 @@ def test_tweak_readme(
142167 release .tweak_readme (tag , filename = str (readme_file ))
143168
144169 # Assert
145- original_lines = original_contents .split ("\n " )
146170 new_contents = readme_file .read_text ()
147171 new_lines = new_contents .split ("\n " )
148172 assert new_lines [0 ] == expected_version
149173 assert new_lines [1 ] == expected_underline
150- assert new_lines [2 :] == original_lines [2 :]
174+ assert expected_whatsnew in new_contents
175+ assert expected_docs in new_contents
176+ assert expected_pep_line in new_contents
151177 assert original_contents .endswith ("\n " )
152178 assert new_contents .endswith ("\n " )
0 commit comments