[Python-checkins] CVS: python/dist/src/Lib/test test_support.py,1.30,1.31

Barry Warsaw bwarsaw@users.sourceforge.net
Wed, 19 Sep 2001 23:30:43 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv1120

Modified Files:
	test_support.py 
Log Message:
run_suite(): Factor this out of run_unittest() for tests that build
their own test suite from a multitude of classes (like test_email.py
will be doing).

run_unittest(): Call run_suite() after making a suite from the
testclass.


Index: test_support.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_support.py,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** test_support.py	2001/09/10 01:39:21	1.30
--- test_support.py	2001/09/20 06:30:41	1.31
***************
*** 158,162 ****
  
  
! def run_unittest(testclass):
      """Run tests from a unittest.TestCase-derived class."""
      if verbose:
--- 158,162 ----
  
  
! def run_suite(suite):
      """Run tests from a unittest.TestCase-derived class."""
      if verbose:
***************
*** 165,169 ****
          runner = BasicTestRunner()
  
-     suite = unittest.makeSuite(testclass)
      result = runner.run(suite)
      if not result.wasSuccessful():
--- 165,168 ----
***************
*** 176,179 ****
--- 175,184 ----
                               % (testclass.__module__, testclass.__name__))
          raise TestFailed(err)
+ 
+ 
+ def run_unittest(testclass):
+     """Run tests from a unittest.TestCase-derived class."""
+     run_suite(unittest.makeSuite(testclass))
+ 
  
  #=======================================================================