[Python-checkins] python/nondist/sandbox/datetime test_both.py,1.31,1.32

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
2002年12月04日 11:24:35 -0800


Update of /cvsroot/python/python/nondist/sandbox/datetime
In directory sc8-pr-cvs1:/tmp/cvs-serv4382
Modified Files:
	test_both.py 
Log Message:
Added a new test for the module constants (trivial, but needs to be
tested!).
Index: test_both.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/datetime/test_both.py,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** test_both.py	3 Dec 2002 23:07:28 -0000	1.31
--- test_both.py	4 Dec 2002 19:24:32 -0000	1.32
***************
*** 37,40 ****
--- 37,49 ----
 
 #############################################################################
+ # module tests
+ 
+ class TestModule(unittest.TestCase):
+ 
+ def test_constants(self):
+ self.assertEqual(datetime.MINYEAR, 1)
+ self.assertEqual(datetime.MAXYEAR, 9999)
+ 
+ #############################################################################
 # timedelta tests
 
***************
*** 853,857 ****
 def test_suite():
 allsuites = [unittest.makeSuite(klass, 'test')
! for klass in (TestTimeDelta,
 TestDate,
 TestDateTime,
--- 862,867 ----
 def test_suite():
 allsuites = [unittest.makeSuite(klass, 'test')
! for klass in (TestModule,
! TestTimeDelta,
 TestDate,
 TestDateTime,

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