File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -715,6 +715,18 @@ def test_locale_calendar_weekday_names(self):
715715 # Any width shorter than the longest necessary should produce abbreviations
716716 self .assertNotEqual (get_weekday_names (max_length ), get_weekday_names (max_length - 1 ))
717717
718+ # These locales have a weekday name longer than English's longest 'Wednesday'
719+ # They should be properly abbreviated rather than truncated
720+ @support .run_with_locale ("LC_ALL" ,
721+ 'Portuguese' , 'pt_PT.UTF-8' ,
722+ 'German' , 'de_DE.UTF-8' ,
723+ 'Russian' , 'ru_RU.UTF-8' ,
724+ 'Sinhala' , 'si_LK.UTF-8'
725+ )
726+ def test_locale_calendar_long_weekday_names (self ):
727+ get_weekday_names = lambda width : calendar .TextCalendar ().formatweekheader (width ).split ()
728+ self .assertEqual (get_weekday_names (4 ), get_weekday_names (9 ))
729+
718730 def test_locale_calendar_formatmonthname (self ):
719731 try :
720732 # formatmonthname uses the same month names regardless of the width argument.
You can’t perform that action at this time.
0 commit comments