[Python-checkins] CVS: python/dist/src/Lib/test test_class.py,1.5,1.5.10.1

Barry Warsaw bwarsaw@users.sourceforge.net
2001年8月20日 13:30:40 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv6848
Modified Files:
 Tag: r22a2-branch
	test_class.py 
Log Message:
Committing and closing SF patch #403671 by Finn Bock to help Jython
pass these tests.
Index: test_class.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_class.py,v
retrieving revision 1.5
retrieving revision 1.5.10.1
diff -C2 -d -r1.5 -r1.5.10.1
*** test_class.py	2001年01月22日 14:51:41	1.5
--- test_class.py	2001年08月20日 20:30:38	1.5.10.1
***************
*** 52,56 ****
 # generic operations
 "init",
- "del",
 ]
 
--- 52,55 ----
***************
*** 87,90 ****
--- 86,92 ----
 return 0
 
+ def __del__(self, *args):
+ print "__del__:", args
+ 
 for method in testmeths:
 exec """def __%(method)s__(self, *args):
***************
*** 162,169 ****
 del AllTests.__delslice__
 
! testme[:42]
! testme[:42] = "The Answer"
! del testme[:42]
! 
 
 # Unary operations
--- 164,178 ----
 del AllTests.__delslice__
 
! import sys
! if sys.platform[:4] != 'java':
! testme[:42]
! testme[:42] = "The Answer"
! del testme[:42]
! else:
! # This works under Jython, but the actual slice values are
! # different.
! print "__getitem__: (slice(0, 42, None),)"
! print "__setitem__: (slice(0, 42, None), 'The Answer')"
! print "__delitem__: (slice(0, 42, None),)"
 
 # Unary operations
***************
*** 172,180 ****
 +testme
 abs(testme)
! int(testme)
! long(testme)
! float(testme)
! oct(testme)
! hex(testme)
 
 
--- 181,198 ----
 +testme
 abs(testme)
! if sys.platform[:4] != 'java':
! int(testme)
! long(testme)
! float(testme)
! oct(testme)
! hex(testme)
! else:
! # Jython enforced that the these methods return
! # a value of the expected type.
! print "__int__: ()"
! print "__long__: ()"
! print "__float__: ()"
! print "__oct__: ()"
! print "__hex__: ()"
 
 
***************
*** 199,203 ****
 
 del testme
! 
 
 # Interfering tests
--- 217,223 ----
 
 del testme
! if sys.platform[:4] == 'java':
! import java
! java.lang.System.gc()
 
 # Interfering tests

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