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):
735
735
def test_locale_calendar_long_weekday_names (self ):
736
736
names = (datetime .date (2001 , 1 , i + 1 ).strftime ('%A' ) for i in range (7 ))
737
737
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
+
738
741
if max_length <= 9 :
739
742
self .skipTest ('weekday names are too short' )
743
+ if abbrev_max_length >= 9 :
744
+ self .skipTest ('abbreviated weekday names are too long' )
740
745
741
746
def get_weekday_names (width ):
742
747
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 ))
744
749
745
750
def test_locale_calendar_formatmonthname (self ):
746
751
try :
You can’t perform that action at this time.
0 commit comments