@@ -71,32 +71,57 @@ def test_tweak_patchlevel(tmp_path: Path) -> None:
7171
7272
7373@pytest .mark .parametrize (
74- ["test_tag" , "expected_version" , "expected_underline" ],
74+ [
75+ "test_tag" ,
76+ "expected_version" ,
77+ "expected_underline" ,
78+ "expected_whatsnew" ,
79+ "expected_docs" ,
80+ "expected_release_details_text" ,
81+ ],
7582 [
7683 (
7784 "3.14.0a6" ,
7885 "This is Python version 3.14.0 alpha 6" ,
7986 "=====================================" ,
87+ "3.14 <https://docs.python.org/3.14/whatsnew/3.14.html>`_" ,
88+ "`Documentation for Python 3.14 <https://docs.python.org/3.14/>`_" ,
89+ "for Python 3.14 release details" ,
8090 ),
8191 (
8292 "3.14.0b2" ,
8393 "This is Python version 3.14.0 beta 2" ,
8494 "====================================" ,
95+ "3.14 <https://docs.python.org/3.14/whatsnew/3.14.html>`_" ,
96+ "`Documentation for Python 3.14 <https://docs.python.org/3.14/>`_" ,
97+ "for Python 3.14 release details" ,
8598 ),
8699 (
87100 "3.14.0rc2" ,
88101 "This is Python version 3.14.0 release candidate 2" ,
89102 "=================================================" ,
103+ "3.14 <https://docs.python.org/3.14/whatsnew/3.14.html>`_" ,
104+ "`Documentation for Python 3.14 <https://docs.python.org/3.14/>`_" ,
105+ "for Python 3.14 release details" ,
90106 ),
91107 (
92- "3.14 .1" ,
93- "This is Python version 3.14 .1" ,
108+ "3.15 .1" ,
109+ "This is Python version 3.15 .1" ,
94110 "=============================" ,
111+ "3.15 <https://docs.python.org/3.15/whatsnew/3.15.html>`_" ,
112+ "`Documentation for Python 3.15 <https://docs.python.org/3.15/>`_" ,
113+ "for Python 3.15 release details" ,
95114 ),
96115 ],
97116)
98117def test_tweak_readme (
99- tmp_path : Path , test_tag : str , expected_version : str , expected_underline : str
118+ tmp_path : Path ,
119+ test_tag : str ,
120+ expected_version : str ,
121+ expected_underline : str ,
122+ expected_whatsnew : str ,
123+ expected_docs : str ,
124+ expected_release_details_text : str ,
100125) -> None :
101126 # Arrange
102127 tag = release .Tag (test_tag )
@@ -110,8 +135,10 @@ def test_tweak_readme(
110135 release .tweak_readme (tag , filename = str (readme_file ))
111136
112137 # Assert
113- original_lines = original_contents . splitlines ()
114- new_lines = readme_file . read_text () .splitlines ()
138+ new_contents = readme_file . read_text ()
139+ new_lines = new_contents .splitlines ()
115140 assert new_lines [0 ] == expected_version
116141 assert new_lines [1 ] == expected_underline
117- assert new_lines [2 :] == original_lines [2 :]
142+ assert expected_whatsnew in new_contents
143+ assert expected_docs in new_contents
144+ assert expected_release_details_text in new_contents
0 commit comments