[Python-checkins] CVS: python/dist/src/Lib/test test_calendar.py,1.1,1.2

Skip Montanaro montanaro@users.sourceforge.net
2002年3月14日 19:57:06 -0800


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv14933
Modified Files:
	test_calendar.py 
Log Message:
added test case to catch index errors with _localized_name class
Index: test_calendar.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_calendar.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_calendar.py	12 Dec 2001 05:38:08 -0000	1.1
--- test_calendar.py	15 Mar 2002 03:57:04 -0000	1.2
***************
*** 27,30 ****
--- 27,34 ----
 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():

AltStyle によって変換されたページ (->オリジナル) /