Skip to content

Commit 14f7f02

Browse files
committed
add a sorting regression test in test_help_xoptions
1 parent 19d96f3 commit 14f7f02

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Lib/test/test_cmd_line.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# See test_cmd_line_script.py for testing of script execution
44

55
import os
6+
import re
67
import subprocess
78
import sys
89
import sysconfig
@@ -64,6 +65,9 @@ def test_help_env(self):
6465
def test_help_xoptions(self):
6566
out = self.verify_valid_flag('--help-xoptions')
6667
self.assertIn(b'-X dev', out)
68+
options = re.findall(b'^-X (\\w+)', out, re.MULTILINE)
69+
self.assertEqual(options, sorted(options),
70+
"options should be sorted alphabetically")
6771

6872
@support.cpython_only
6973
def test_help_all(self):

0 commit comments

Comments
 (0)