diff options
author | Skip Montanaro <skip@pobox.com> | 2002-03-15 03:57:04 (GMT) |
---|---|---|
committer | Skip Montanaro <skip@pobox.com> | 2002-03-15 03:57:04 (GMT) |
commit | 693c6c44c4db6049bc53da51fbd1a084a33a75b2 (patch) | |
tree | 1162fc426fb504f2f07ab453a88ae6151f7d68ac /Lib/test | |
parent | b32302176e127a94b714f90c858b6e9c476fc7fe (diff) | |
download | cpython-693c6c44c4db6049bc53da51fbd1a084a33a75b2.zip cpython-693c6c44c4db6049bc53da51fbd1a084a33a75b2.tar.gz cpython-693c6c44c4db6049bc53da51fbd1a084a33a75b2.tar.bz2 |
added test case to catch index errors with _localized_name class
Diffstat (limited to 'Lib/test')
-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) |