Skip to content

Commit 78935da

Browse files
committed
gh-69714: Restore the test thrown out by cb0523e
1 parent cb0523e commit 78935da

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Lib/test/test_calendar.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,11 +559,27 @@ def test_locale_calendars(self):
559559
self.assertEqual(len(local_weekday), 10)
560560
self.assertEqual(len(local_weekday_abbr), 3)
561561
self.assertGreaterEqual(len(local_month), 10)
562+
563+
cal = calendar.LocaleTextCalendar(locale='')
564+
local_weekday = cal.formatweekday(1, 10)
565+
local_month = cal.formatmonthname(2010, 10, 10)
566+
self.assertIsInstance(local_weekday, str)
567+
self.assertIsInstance(local_month, str)
568+
self.assertEqual(len(local_weekday), 10)
569+
self.assertGreaterEqual(len(local_month), 10)
570+
562571
cal = calendar.LocaleHTMLCalendar(locale=None)
563572
local_weekday = cal.formatweekday(1)
564573
local_month = cal.formatmonthname(2010, 10)
565574
self.assertIsInstance(local_weekday, str)
566575
self.assertIsInstance(local_month, str)
576+
577+
cal = calendar.LocaleHTMLCalendar(locale='')
578+
local_weekday = cal.formatweekday(1)
579+
local_month = cal.formatmonthname(2010, 10)
580+
self.assertIsInstance(local_weekday, str)
581+
self.assertIsInstance(local_month, str)
582+
567583
new_october = calendar.TextCalendar().formatmonthname(2010, 10, 10)
568584
self.assertEqual(old_october, new_october)
569585

0 commit comments

Comments
 (0)