From 2bcbe96e6dee5c44b2787f3d73e30812fc6c63c2 Mon Sep 17 00:00:00 2001 From: Shahar Naveh <50263213+ShaharNaveh@users.noreply.github.com> Date: Tue, 12 May 2026 14:53:03 +0300 Subject: [PATCH] Update `test_calendar.py` to 3.14.5 (#7848) --- Lib/test/test_calendar.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Lib/test/test_calendar.py b/Lib/test/test_calendar.py index 7ade4271b..ca93e99d1 100644 --- a/Lib/test/test_calendar.py +++ b/Lib/test/test_calendar.py @@ -457,12 +457,17 @@ class OutputTestCase(unittest.TestCase): calendar.TextCalendar().formatmonth(0, 2), result_0_02_text ) + def test_formatmonth_with_invalid_month(self): with self.assertRaises(calendar.IllegalMonthError): calendar.TextCalendar().formatmonth(2017, 13) with self.assertRaises(calendar.IllegalMonthError): calendar.TextCalendar().formatmonth(2017, -1) + def test_illegal_month_error_bases(self): + self.assertIsSubclass(calendar.IllegalMonthError, ValueError) + self.assertIsSubclass(calendar.IllegalMonthError, IndexError) + def test_formatmonthname_with_year(self): self.assertEqual( calendar.HTMLCalendar().formatmonthname(2004, 1, withyear=True),