Skip to content

Commit cb0523e

Browse files
rohitmedirattabxsx
authored andcommitted
Increased test coverage of calendar module
1 parent 4082c8e commit cb0523e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Lib/test/test_calendar.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,17 +546,20 @@ def test_locale_calendars(self):
546546
# (it is still not thread-safe though)
547547
old_october = calendar.TextCalendar().formatmonthname(2010, 10, 10)
548548
try:
549-
cal = calendar.LocaleTextCalendar(locale='')
549+
cal = calendar.LocaleTextCalendar(locale=None)
550550
local_weekday = cal.formatweekday(1, 10)
551+
local_weekday_abbr = cal.formatweekday(1, 3)
551552
local_month = cal.formatmonthname(2010, 10, 10)
552553
except locale.Error:
553554
# cannot set the system default locale -- skip rest of test
554555
raise unittest.SkipTest('cannot set the system default locale')
555556
self.assertIsInstance(local_weekday, str)
557+
self.assertIsInstance(local_weekday_abbr, str)
556558
self.assertIsInstance(local_month, str)
557559
self.assertEqual(len(local_weekday), 10)
560+
self.assertEqual(len(local_weekday_abbr), 3)
558561
self.assertGreaterEqual(len(local_month), 10)
559-
cal = calendar.LocaleHTMLCalendar(locale='')
562+
cal = calendar.LocaleHTMLCalendar(locale=None)
560563
local_weekday = cal.formatweekday(1)
561564
local_month = cal.formatmonthname(2010, 10)
562565
self.assertIsInstance(local_weekday, str)

0 commit comments

Comments
 (0)