@@ -644,14 +644,14 @@ def test_locale_calendar_formatmonthname(self):
644
644
try :
645
645
# formatmonthname uses the same month names regardless of the width argument.
646
646
cal = calendar .LocaleTextCalendar (locale = 'en_US' )
647
+ # For too short widths, a full name (with year) is used.
648
+ self .assertEqual (cal .formatmonthname (2022 , 6 , 2 , withyear = False ), "June" )
649
+ self .assertEqual (cal .formatmonthname (2022 , 6 , 2 , withyear = True ), "June 2022" )
650
+ # For long widths, a centered name is used.
651
+ self .assertEqual (cal .formatmonthname (2022 , 6 , 10 , withyear = False ), " June " )
652
+ self .assertEqual (cal .formatmonthname (2022 , 6 , 15 , withyear = True ), " June 2022 " )
647
653
except locale .Error :
648
654
raise unittest .SkipTest ('cannot set the en_US locale' )
649
- # For too short widths, a full name (with year) is used.
650
- self .assertEqual (cal .formatmonthname (2022 , 6 , 2 , withyear = False ), "June" )
651
- self .assertEqual (cal .formatmonthname (2022 , 6 , 2 , withyear = True ), "June 2022" )
652
- # For long widths, a centered name is used.
653
- self .assertEqual (cal .formatmonthname (2022 , 6 , 10 , withyear = False ), " June " )
654
- self .assertEqual (cal .formatmonthname (2022 , 6 , 15 , withyear = True ), " June 2022 " )
655
655
656
656
def test_locale_html_calendar_custom_css_class_month_name (self ):
657
657
try :
0 commit comments