File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -735,12 +735,17 @@ def get_weekday_names(width):
735735 def test_locale_calendar_long_weekday_names (self ):
736736 names = (datetime .date (2001 , 1 , i + 1 ).strftime ('%A' ) for i in range (7 ))
737737 max_length = max (map (len , names ))
738+ abbrev_names = (datetime .date (2001 , 1 , i + 1 ).strftime ('%a' ) for i in range (7 ))
739+ abbrev_max_length = max (map (len , abbrev_names ))
740+
738741 if max_length <= 9 :
739742 self .skipTest ('weekday names are too short' )
743+ if abbrev_max_length >= 9 :
744+ self .skipTest ('abbreviated weekday names are too long' )
740745
741746 def get_weekday_names (width ):
742747 return calendar .TextCalendar ().formatweekheader (width ).split ()
743- self .assertEqual (get_weekday_names (4 ), get_weekday_names (9 ))
748+ self .assertEqual (get_weekday_names (abbrev_max_length ), get_weekday_names (max_length - 1 ))
744749
745750 def test_locale_calendar_formatmonthname (self ):
746751 try :
You can’t perform that action at this time.
0 commit comments