@@ -1270,16 +1270,20 @@ def test_ask_question_prints_numbered_options(self):
12701270 self .assertIn ("1) long option a" , out )
12711271 self .assertIn ("2) long option b" , out )
12721272
1273- def test_ask_question_short_options_stay_inline (self ):
1274- """Single-letter options (y/n/a/d) keep the compact inline
1275- format, but a number still resolves to the matching option."""
1276- tui , _ = make_tui ()
1273+ def test_ask_question_short_options_numbered_too (self ):
1274+ """Single-letter options (y/n/a/d) also render as a numbered
1275+ list — numbers apply to ALL option lists now — and a number
1276+ resolves to the matching option."""
1277+ tui , buf = make_tui ()
12771278 q = UiQuestion ("Proceed?" , options = ["y" , "n" ])
12781279 tui .question = q
1279- with mock .patch .object (tui .prompt_session , "prompt" , return_value = "1 " ) as m :
1280+ with mock .patch .object (tui .prompt_session , "prompt" , return_value = "2 " ) as m :
12801281 tui ._ask_question_blocking ()
1281- self .assertEqual (q .answer , "y" )
1282- m .assert_called_once_with ("Proceed? [choices: y, n] > " , multiline = False )
1282+ self .assertEqual (q .answer , "n" )
1283+ m .assert_called_once_with ("> " , multiline = False )
1284+ out = buf .getvalue ()
1285+ self .assertIn ("1) y" , out )
1286+ self .assertIn ("2) n" , out )
12831287
12841288 def test_ask_question_custom_answer_passthrough (self ):
12851289 """Free-text answers (not numbers) are returned verbatim."""
0 commit comments