[Python-checkins] python/nondist/sandbox/datetime test_both.py,1.76,1.77

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
2002年12月13日 17:41:58 -0800


Update of /cvsroot/python/python/nondist/sandbox/datetime
In directory sc8-pr-cvs1:/tmp/cvs-serv4262
Modified Files:
	test_both.py 
Log Message:
Made sure an out-of-bounds datetimetz utcoffset is caught by hashing.
Index: test_both.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/datetime/test_both.py,v
retrieving revision 1.76
retrieving revision 1.77
diff -C2 -d -r1.76 -r1.77
*** test_both.py	14 Dec 2002 01:33:57 -0000	1.76
--- test_both.py	14 Dec 2002 01:41:56 -0000	1.77
***************
*** 1892,1895 ****
--- 1892,1898 ----
 hash(t)
 
+ # OTOH, an OOB offset should blow up.
+ t = self.theclass(5, 5, 5, tzinfo=FixedOffset(-1440, ""))
+ self.assertRaises(ValueError, hash, t)
 
 def test_suite():

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