[Python-checkins] CVS: python/dist/src/Lib/test test_descr.py,1.39,1.40

Guido van Rossum gvanrossum@users.sourceforge.net
2001年9月11日 07:02:25 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv18334
Modified Files:
	test_descr.py 
Log Message:
Restore the comparisons that I initially put in the test but that Tim
XXX'ed out. Turns out that after fixing the constructors, the
comparisons in fact succeed. E.g. int(hexint(12345)) returns an int
with value 12345.
Index: test_descr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_descr.py,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** test_descr.py	2001年09月11日 03:07:38	1.39
--- test_descr.py	2001年09月11日 14:02:22	1.40
***************
*** 1365,1369 ****
 verify(repr(hexint(1000) + 7) == "0x3ef")
 a = hexint(12345)
! #XXX verify(int(a) == 12345)
 verify(int(a).__class__ is int)
 
--- 1365,1369 ----
 verify(repr(hexint(1000) + 7) == "0x3ef")
 a = hexint(12345)
! verify(int(a) == 12345)
 verify(int(a).__class__ is int)
 
***************
*** 1383,1387 ****
 verify(str(5 + octlong(3000)) == "05675")
 a = octlong(12345)
! #XXX verify(long(a) == 12345L)
 verify(long(a).__class__ is long)
 
--- 1383,1387 ----
 verify(str(5 + octlong(3000)) == "05675")
 a = octlong(12345)
! verify(long(a) == 12345L)
 verify(long(a).__class__ is long)
 
***************
*** 1395,1399 ****
 verify(repr(precfloat(1.1)) == "1.1")
 a = precfloat(12345)
! #XXX verify(float(a) == 12345.0)
 verify(float(a).__class__ is float)
 
--- 1395,1399 ----
 verify(repr(precfloat(1.1)) == "1.1")
 a = precfloat(12345)
! verify(float(a) == 12345.0)
 verify(float(a).__class__ is float)
 
***************
*** 1420,1424 ****
 a = madtuple(())
 verify(tuple(a) == ())
! #XXX verify(tuple(a).__class__ is tuple)
 
 class madstring(str):
--- 1420,1424 ----
 a = madtuple(())
 verify(tuple(a) == ())
! verify(tuple(a).__class__ is tuple)
 
 class madstring(str):
***************
*** 1440,1448 ****
 verify(u == s)
 s = madstring("12345")
! #XXX verify(str(s) == "12345")
 verify(str(s).__class__ is str)
 
 s = madstring("\x00" * 5)
! #XXX verify(str(s) == "\x00" * 5)
 verify(str(s).__class__ is str)
 
--- 1440,1448 ----
 verify(u == s)
 s = madstring("12345")
! verify(str(s) == "12345")
 verify(str(s).__class__ is str)
 
 s = madstring("\x00" * 5)
! verify(str(s) == "\x00" * 5)
 verify(str(s).__class__ is str)
 

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