[Python-checkins] CVS: python/dist/src/Lib/test test_inspect.py,1.6,1.7

Tim Peters tim_one@users.sourceforge.net
2001年10月15日 15:52:27 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv5355/python/Lib/test
Modified Files:
	test_inspect.py 
Log Message:
Remove obsolete __dynamic__ distinction.
Index: test_inspect.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_inspect.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** test_inspect.py	2001年09月23日 02:00:29	1.6
--- test_inspect.py	2001年10月15日 22:52:25	1.7
***************
*** 298,374 ****
 test(('datablob', 'data', A) in attrs, 'missing data')
 
! # Repeat all that, but w/ new-style non-dynamic classes.
! 
! class A(object):
! __dynamic__ = 0
! 
! def s(): pass
! s = staticmethod(s)
! 
! def c(cls): pass
! c = classmethod(c)
! 
! def getp(self): pass
! p = property(getp)
! 
! def m(self): pass
! 
! def m1(self): pass
! 
! datablob = '1'
! 
! attrs = attrs_wo_objs(A)
! test(('s', 'static method', A) in attrs, 'missing static method')
! test(('c', 'class method', A) in attrs, 'missing class method')
! test(('p', 'property', A) in attrs, 'missing property')
! test(('m', 'method', A) in attrs, 'missing plain method')
! test(('m1', 'method', A) in attrs, 'missing plain method')
! test(('datablob', 'data', A) in attrs, 'missing data')
! 
! class B(A):
! __dynamic__ = 0
! 
! def m(self): pass
! 
! attrs = attrs_wo_objs(B)
! test(('s', 'static method', A) in attrs, 'missing static method')
! test(('c', 'class method', A) in attrs, 'missing class method')
! test(('p', 'property', A) in attrs, 'missing property')
! test(('m', 'method', B) in attrs, 'missing plain method')
! test(('m1', 'method', A) in attrs, 'missing plain method')
! test(('datablob', 'data', A) in attrs, 'missing data')
! 
! 
! class C(A):
! __dynamic__ = 0
! 
! def m(self): pass
! def c(self): pass
! 
! attrs = attrs_wo_objs(C)
! test(('s', 'static method', A) in attrs, 'missing static method')
! test(('c', 'method', C) in attrs, 'missing plain method')
! test(('p', 'property', A) in attrs, 'missing property')
! test(('m', 'method', C) in attrs, 'missing plain method')
! test(('m1', 'method', A) in attrs, 'missing plain method')
! test(('datablob', 'data', A) in attrs, 'missing data')
! 
! class D(B, C):
! __dynamic__ = 0
! 
! def m1(self): pass
! 
! attrs = attrs_wo_objs(D)
! test(('s', 'static method', A) in attrs, 'missing static method')
! test(('c', 'method', C) in attrs, 'missing plain method')
! test(('p', 'property', A) in attrs, 'missing property')
! test(('m', 'method', B) in attrs, 'missing plain method')
! test(('m1', 'method', D) in attrs, 'missing plain method')
! test(('datablob', 'data', A) in attrs, 'missing data')
! 
! # And again, but w/ new-style dynamic classes.
 
 class A(object):
- __dynamic__ = 1
 
 def s(): pass
--- 298,304 ----
 test(('datablob', 'data', A) in attrs, 'missing data')
 
! # Repeat all that, but w/ new-style classes.
 
 class A(object):
 
 def s(): pass
***************
*** 396,400 ****
 
 class B(A):
- __dynamic__ = 1
 
 def m(self): pass
--- 326,329 ----
***************
*** 410,414 ****
 
 class C(A):
- __dynamic__ = 1
 
 def m(self): pass
--- 339,342 ----
***************
*** 424,428 ****
 
 class D(B, C):
- __dynamic__ = 1
 
 def m1(self): pass
--- 352,355 ----

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