diff options
-rw-r--r-- | Lib/test/test_calendar.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_calendar.py b/Lib/test/test_calendar.py index 1807a59..eed96ef 100644 --- a/Lib/test/test_calendar.py +++ b/Lib/test/test_calendar.py @@ -26,6 +26,10 @@ class CalendarTestCase(unittest.TestCase): self.assertEqual(calendar.firstweekday(), calendar.MONDAY) calendar.setfirstweekday(orig) + def test_enumerateweekdays(self): + self.assertRaises(IndexError, calendar.day_abbr.__getitem__, -10) + self.assertRaises(IndexError, calendar.day_name.__getitem__, 10) + self.assertEqual(len([d for d in calendar.day_abbr]), 7) def test_main(): run_unittest(CalendarTestCase) |