Skip to content

Commit 2bcbe96

Browse files
authored
Update test_calendar.py to 3.14.5 (#7848)
1 parent f535769 commit 2bcbe96

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Lib/test/test_calendar.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,12 +457,17 @@ def test_formatmonth(self):
457457
calendar.TextCalendar().formatmonth(0, 2),
458458
result_0_02_text
459459
)
460+
460461
def test_formatmonth_with_invalid_month(self):
461462
with self.assertRaises(calendar.IllegalMonthError):
462463
calendar.TextCalendar().formatmonth(2017, 13)
463464
with self.assertRaises(calendar.IllegalMonthError):
464465
calendar.TextCalendar().formatmonth(2017, -1)
465466

467+
def test_illegal_month_error_bases(self):
468+
self.assertIsSubclass(calendar.IllegalMonthError, ValueError)
469+
self.assertIsSubclass(calendar.IllegalMonthError, IndexError)
470+
466471
def test_formatmonthname_with_year(self):
467472
self.assertEqual(
468473
calendar.HTMLCalendar().formatmonthname(2004, 1, withyear=True),

0 commit comments

Comments
 (0)