From: Michael W. Hudson Date: Sun, 17 Mar 2002 18:59:32 +0000 (+0000) Subject: Backport a little test from Skip. X-Git-Tag: v2.2.1c1~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3c9dbe200c32cd4fe43fe3c9ac1fcb03d50c1b22;p=thirdparty%2FPython%2Fcpython.git Backport a little test from Skip. --- diff --git a/Lib/test/test_calendar.py b/Lib/test/test_calendar.py index 1807a59ad369..eed96efa9365 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)