]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport a little test from Skip.
authorMichael W. Hudson <mwh@python.net>
Sun, 17 Mar 2002 18:59:32 +0000 (18:59 +0000)
committerMichael W. Hudson <mwh@python.net>
Sun, 17 Mar 2002 18:59:32 +0000 (18:59 +0000)
Lib/test/test_calendar.py

index 1807a59ad369c3fdfc08665cd6f81c2dc0f5733f..eed96efa9365292602afe11826893536f42a1631 100644 (file)
@@ -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)