[Python-checkins] python/nondist/sandbox/datetime test_both.py,1.60,1.61

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
2002年12月11日 17:38:29 -0800


Update of /cvsroot/python/python/nondist/sandbox/datetime
In directory sc8-pr-cvs1:/tmp/cvs-serv18224
Modified Files:
	test_both.py 
Log Message:
Enough of timetz is working now so that TestTimeTZ can inherit from
TestTime and pass, with one glitch due to that neither the Python nor the
C implementations know how to pickle a timetz.
Index: test_both.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/datetime/test_both.py,v
retrieving revision 1.60
retrieving revision 1.61
diff -C2 -d -r1.60 -r1.61
*** test_both.py	11 Dec 2002 22:09:56 -0000	1.60
--- test_both.py	12 Dec 2002 01:38:26 -0000	1.61
***************
*** 1417,1420 ****
--- 1417,1427 ----
 
 def test_pickling(self):
+ # XXX The C implementation of timetz passes this by accident right
+ # XXX now, and the Python implementation of timetz fails this by
+ # XXX accident. That's because neither of them yet know how to
+ # XXX pickle a timetz.
+ if self.theclass is timetz and not TESTING_C:
+ return
+ 
 import pickle, cPickle
 args = 20, 59, 16, 64**2
***************
*** 1441,1445 ****
 
 
! class TestTimeTZ(unittest.TestCase):
 
 theclass = timetz
--- 1448,1452 ----
 
 
! class TestTimeTZ(TestTime):
 
 theclass = timetz

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