Update test_calendar.py to 3.14.5 (#7848)

This commit is contained in:
Shahar Naveh authored and GitHub committed 2026-05-12 20:53:03 +09:00
1 parent f5357692e8
commit 2bcbe96e6d
1 file changed
+5
+5
View File
@@ -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),