@@ -568,11 +568,15 @@ def test_locale_calendar_formatweekday(self):
568568 try :
569569 # formatweekday uses different day names based on the available width.
570570 cal = calendar .LocaleTextCalendar (locale = 'en_US' )
571+ # For really short widths, the abbreviated name is truncated.
572+ self .assertEqual (cal .formatweekday (0 , 1 ), "M" )
573+ self .assertEqual (cal .formatweekday (0 , 2 ), "Mo" )
571574 # For short widths, a centered, abbreviated name is used.
575+ self .assertEqual (cal .formatweekday (0 , 3 ), "Mon" )
572576 self .assertEqual (cal .formatweekday (0 , 5 ), " Mon " )
573- # For really short widths, even the abbreviated name is truncated.
574- self .assertEqual (cal .formatweekday (0 , 2 ), "Mo" )
577+ self .assertEqual (cal .formatweekday (0 , 8 ), " Mon " )
575578 # For long widths, the full day name is used.
579+ self .assertEqual (cal .formatweekday (0 , 9 ), " Monday " )
576580 self .assertEqual (cal .formatweekday (0 , 10 ), " Monday " )
577581 except locale .Error :
578582 raise unittest .SkipTest ('cannot set the en_US locale' )
0 commit comments