@@ -469,7 +469,7 @@ def test_colorized_error_message(self):
469469
470470 self .assertEqual (
471471 reader .msg ,
472- f"{ ANSIColors .RED } nothing to yank{ ANSIColors .RESET } " ,
472+ f"{ ANSIColors .RED } [ nothing to yank ] { ANSIColors .RESET } " ,
473473 )
474474 self .assertEqual (reader .screen [- 1 ], reader .msg )
475475
@@ -495,69 +495,69 @@ def _test_error_message(
495495 console .beep .assert_called_once ()
496496
497497 def test_invalid_key_message (self ):
498- self ._test_error_message ("\x1b o" , "no command is bound to this key" )
498+ self ._test_error_message ("\x1b o" , "[ no command is bound to this key ] " )
499499
500500 def test_unimplemented_command_message (self ):
501501 self ._test_error_message (
502502 "x" ,
503- "command 'missing-command' is not implemented" ,
503+ "[ command 'missing-command' is not implemented ] " ,
504504 command = "missing-command" ,
505505 )
506506
507507 def test_nothing_to_yank_message (self ):
508- self ._test_error_message ("\x19 " , "nothing to yank" )
508+ self ._test_error_message ("\x19 " , "[ nothing to yank ] " )
509509
510510 def test_yank_pop_with_empty_kill_ring_message (self ):
511- self ._test_error_message ("\x1b y" , "nothing to yank" )
511+ self ._test_error_message ("\x1b y" , "[ nothing to yank ] " )
512512
513513 def test_yank_pop_after_other_command_message (self ):
514514 self ._test_error_message (
515515 "x\x01 \x0b \x1b y" ,
516- "previous command was not a yank" ,
516+ "[ previous command was not a yank ] " ,
517517 )
518518
519519 def test_start_of_history_message (self ):
520- self ._test_error_message ("\x10 " , "start of history list" )
520+ self ._test_error_message ("\x10 " , "[ start of history list ] " )
521521
522522 def test_end_of_history_message (self ):
523- self ._test_error_message ("\x0e " , "end of history list" )
523+ self ._test_error_message ("\x0e " , "[ end of history list ] " )
524524
525525 def test_yank_arg_at_beginning_of_history_message (self ):
526526 self ._test_error_message (
527527 "\x1b .\x1b .\x1b ." ,
528- "beginning of history list" ,
528+ "[ beginning of history list ] " ,
529529 history = ["one" ],
530530 historyi = 1 ,
531531 )
532532
533533 def test_yank_arg_with_no_argument_message (self ):
534534 self ._test_error_message (
535535 "\x1b ." ,
536- "no such arg" ,
536+ "[ no such arg ] " ,
537537 history = ["" ],
538538 historyi = 1 ,
539539 )
540540
541541 def test_empty_incremental_search_backspace_message (self ):
542542 self ._test_error_message (
543543 "x" ,
544- "nothing to rubout" ,
544+ "[ nothing to rubout ] " ,
545545 command = "isearch-backspace" ,
546546 )
547547
548548 def test_history_search_not_found_message (self ):
549549 self ._test_error_message (
550550 "missingx" ,
551- "not found" ,
551+ "[ not found ] " ,
552552 command = "history-search-backward" ,
553553 binding = "x" ,
554554 )
555555
556556 def test_incremental_search_not_found_message (self ):
557- self ._test_error_message ("\x12 x" , "not found" )
557+ self ._test_error_message ("\x12 x" , "[ not found ] " )
558558
559559 def test_no_completion_matches_message (self ):
560- self ._test_error_message ("does_not_exist\t " , "no matches" )
560+ self ._test_error_message ("does_not_exist\t " , "[ no matches ] " )
561561
562562
563563@force_colorized_test_class
0 commit comments