[Python-checkins] CVS: python/dist/src/Lib doctest.py,1.9,1.10
Tim Peters
tim_one@users.sourceforge.net
Wed, 21 Mar 2001 15:08:01 -0800
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv4225/python/dist/src/Lib
Modified Files:
doctest.py
Log Message:
Changed doctest to run tests in alphabetic order of name.
This makes verbose-mode output easier to dig thru, and removes an accidental
dependence on the order of dict.items() (made visible by recent changes to
dictobject.c).
Index: doctest.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/doctest.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** doctest.py 2001/03/18 17:05:58 1.9
--- doctest.py 2001/03/21 23:07:59 1.10
***************
*** 814,818 ****
`d`)
f = t = 0
! for thisname, value in d.items():
if type(value) in (_FunctionType, _ClassType):
f2, t2 = self.__runone(value, name + "." + thisname)
--- 814,823 ----
`d`)
f = t = 0
! # Run the tests by alpha order of names, for consistency in
! # verbose-mode output.
! names = d.keys()
! names.sort()
! for thisname in names:
! value = d[thisname]
if type(value) in (_FunctionType, _ClassType):
f2, t2 = self.__runone(value, name + "." + thisname)
***************
*** 833,837 ****
try:
self.isprivate = lambda *args: 0
! for k, v in d.items():
thisname = prefix + k
if type(v) is _StringType:
--- 838,847 ----
try:
self.isprivate = lambda *args: 0
! # Run the tests by alpha order of names, for consistency in
! # verbose-mode output.
! keys = d.keys()
! keys.sort()
! for k in keys:
! v = d[k]
thisname = prefix + k
if type(v) is _StringType: