[Python-checkins] CVS: python/dist/src/Doc/lib libunittest.tex,1.5,1.6

Fred L. Drake fdrake@users.sourceforge.net
Thu, 06 Sep 2001 08:51:58 -0700


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv32154/lib

Modified Files:
	libunittest.tex 
Log Message:
Several updates to cover omissions noted by Rich Salz.
This closes SF bug #458771.


Index: libunittest.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libunittest.tex,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** libunittest.tex	2001/07/14 02:50:55	1.5
--- libunittest.tex	2001/09/06 15:51:56	1.6
***************
*** 580,584 ****
--- 580,597 ----
  \end{methoddesc}
  
+ The \method{run()} method is also slightly different:
+ 
+ \begin{methoddesc}[TestSuite]{run}{result}
+   Run the tests associated with this suite, collecting the result into
+   the test result object passed as \var{result}.  Note that unlike
+   \method{TestCase.run()}, \method{TestSuite.run()} requires the
+   result object to be passed in.
+ \end{methoddesc}
  
+ In the typical usage of a \class{TestSuite} object, the \method{run()}
+ method is invoked by a \class{TestRunner} rather than by the end-user
+ test harness.
+ 
+ 
  \subsection{TestResult Objects
              \label{testresult-objects}}
***************
*** 707,713 ****
    Return a suite of all tests cases given a string specifier.
  
!   The specifier \var{name} may resolve either to a module, a test case
!   class, a test method within a test case class, or a callable object
!   which returns a \class{TestCase} or \class{TestSuite} instance.
  
    The method optionally resolves \var{name} relative to a given module.
--- 720,737 ----
    Return a suite of all tests cases given a string specifier.
  
!   The specifier \var{name} is a ``dotted name'' that may resolve
!   either to a module, a test case class, a test method within a test
!   case class, or a callable object which returns a \class{TestCase} or
!   \class{TestSuite} instance.  For example, if you have a module
!   \module{SampleTests} containing a \class{TestCase}-derived class
!   \class{SampleTestCase} with three test methods (\method{test_one()},
!   \method{test_two()}, and \method{test_three()}), the specifier
!   \code{'SampleTests.SampleTestCase'} would cause this method to
!   return a suite which will run all three test methods.  Using the
!   specifier \code{'SampleTests.SampleTestCase.test_two'} would cause
!   it to return a test suite which will run only the
!   \method{test_two()} test method.  The specifier can refer to modules
!   and packages which have not been imported; they will be imported as
!   a side-effect.
  
    The method optionally resolves \var{name} relative to a given module.