@@ -58,3 +58,33 @@ def test_glob_blurbs_sort_order(fs) -> None:
5858
5959 # Assert
6060 assert filenames == expected
61+
62+
63+ def test_glob_blurbs_section_ordering (fs ) -> None :
64+ """Sections must appear in importance order, not alphabetical order.
65+
66+ The canonical order is: Security, Core and Builtins, Library,
67+ Documentation, Tests, Build, Windows, macOS, IDLE, Tools/Demos, C API.
68+ """
69+ # Arrange: one entry per section
70+ fake_news_entries = [
71+ 'Misc/NEWS.d/next/Security/2024-01-01-00-00-00.gh-issue-00000.aAAAAA.rst' ,
72+ 'Misc/NEWS.d/next/Core_and_Builtins/2024-01-01-00-00-00.gh-issue-00001.bBBBBB.rst' ,
73+ 'Misc/NEWS.d/next/Library/2024-01-01-00-00-00.gh-issue-00002.cCCCCC.rst' ,
74+ 'Misc/NEWS.d/next/Documentation/2024-01-01-00-00-00.gh-issue-00003.dDDDDD.rst' ,
75+ 'Misc/NEWS.d/next/Tests/2024-01-01-00-00-00.gh-issue-00004.eEEEEE.rst' ,
76+ 'Misc/NEWS.d/next/Build/2024-01-01-00-00-00.gh-issue-00005.fFFFFF.rst' ,
77+ 'Misc/NEWS.d/next/Windows/2024-01-01-00-00-00.gh-issue-00006.gGGGGG.rst' ,
78+ 'Misc/NEWS.d/next/macOS/2024-01-01-00-00-00.gh-issue-00007.hHHHHH.rst' ,
79+ 'Misc/NEWS.d/next/IDLE/2024-01-01-00-00-00.gh-issue-00008.iIIIII.rst' ,
80+ 'Misc/NEWS.d/next/Tools-Demos/2024-01-01-00-00-00.gh-issue-00009.jJJJJJ.rst' ,
81+ 'Misc/NEWS.d/next/C_API/2024-01-01-00-00-00.gh-issue-00010.kKKKKK.rst' ,
82+ ]
83+ for path in fake_news_entries :
84+ fs .create_file (path )
85+
86+ # Act
87+ filenames = glob_blurbs ('next' )
88+
89+ # Assert: must be in importance order, not alphabetical
90+ assert filenames == fake_news_entries
0 commit comments