mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Update test_calendar.py to 3.14.5 (#7848)
This commit is contained in:
1 parent
f5357692e8
commit
2bcbe96e6d
1 file changed
+5
Vendored
+5
@@ -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),
|
||||
|
||||
Reference in new issue
Block a user