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

Tim Peters tim_one@users.sourceforge.net
2001年10月01日 20:53:43 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv5055/python/Lib/test
Modified Files:
	test_pyclbr.py 
Log Message:
SF patch [#466616] Exclude imported items from doctest,
from Tim Hochberg. Also mucho fiddling to change the way doctest
determines whether a thing is a function, module or class. Under 2.2,
this really requires the functions in inspect.py (e.g., types.ClassType
is close to meaningless now, if not outright misleading).
Index: test_pyclbr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_pyclbr.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** test_pyclbr.py	2001年09月20日 21:33:42	1.4
--- test_pyclbr.py	2001年10月02日 03:53:41	1.5
***************
*** 33,37 ****
 ''' succeed iff hasattr(obj,attr) or attr in ignore. '''
 if attr in ignore: return
! if not hasattr(obj, attr): print "???",attr
 self.failUnless(hasattr(obj, attr))
 
--- 33,37 ----
 ''' succeed iff hasattr(obj,attr) or attr in ignore. '''
 if attr in ignore: return
! if not hasattr(obj, attr): print "???", attr
 self.failUnless(hasattr(obj, attr))
 
***************
*** 101,105 ****
 def test_easy(self):
 self.checkModule('pyclbr')
! self.checkModule('doctest')
 self.checkModule('rfc822')
 self.checkModule('xmllib')
--- 101,106 ----
 def test_easy(self):
 self.checkModule('pyclbr')
! self.checkModule('doctest',
! ignore=['_isclass', '_isfunction', '_ismodule'])
 self.checkModule('rfc822')
 self.checkModule('xmllib')

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