@@ -568,11 +568,15 @@ def test_locale_calendar_formatweekday(self):
568
568
try :
569
569
# formatweekday uses different day names based on the available width.
570
570
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" )
571
574
# For short widths, a centered, abbreviated name is used.
575
+ self .assertEqual (cal .formatweekday (0 , 3 ), "Mon" )
572
576
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 " )
575
578
# For long widths, the full day name is used.
579
+ self .assertEqual (cal .formatweekday (0 , 9 ), " Monday " )
576
580
self .assertEqual (cal .formatweekday (0 , 10 ), " Monday " )
577
581
except locale .Error :
578
582
raise unittest .SkipTest ('cannot set the en_US locale' )
0 commit comments