Slightly refactored test suite to do the same thing with less code.
authordinu_gherman
Thu, 04 Jul 2002 09:24:49 +0000
changeset 1667 dfe2f821f4e2
parent 1666 c828f523016b
child 1668 448a9205be12
Slightly refactored test suite to do the same thing with less code.
reportlab/test/test_charts_textlabels.py
reportlab/test/test_docs_build.py
reportlab/test/test_docstrings.py
reportlab/test/test_extra.py
reportlab/test/test_graphics_charts.py
reportlab/test/test_graphics_images.py
reportlab/test/test_graphics_speed.py
reportlab/test/test_hello.py
reportlab/test/test_lib_colors.py
reportlab/test/test_lib_sequencer.py
reportlab/test/test_lib_validators.py
reportlab/test/test_multibyte_chs.py
reportlab/test/test_multibyte_cht.py
reportlab/test/test_multibyte_jpn.py
reportlab/test/test_multibyte_kor.py
reportlab/test/test_paragraphs.py
reportlab/test/test_pdfbase_encodings.py
reportlab/test/test_pdfbase_fontembed.py
reportlab/test/test_pdfbase_pdfmetrics.py
reportlab/test/test_pdfbase_pdfutils.py
reportlab/test/test_pdfbase_ttfonts.py
reportlab/test/test_pdfgen_callback.py
reportlab/test/test_pdfgen_general.py
reportlab/test/test_pdfgen_pagemodes.py
reportlab/test/test_platypus_breaking.py
reportlab/test/test_platypus_general.py
reportlab/test/test_platypus_paragraphs.py
reportlab/test/test_platypus_tables.py
reportlab/test/test_platypus_toc.py
reportlab/test/test_platypus_xref.py
reportlab/test/test_pyfiles.py
reportlab/test/test_renderSVG.py
reportlab/test/test_tools_pythonpoint.py
reportlab/test/test_widgetbase_tpc.py
reportlab/test/test_widgets_grids.py
reportlab/test/utils.py
--- a/reportlab/test/test_charts_textlabels.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_charts_textlabels.py	Thu Jul 04 09:24:49 2002 +0000
@@ -1,7 +1,7 @@
 #copyright ReportLab Inc. 2000-2001
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/test/test_charts_textlabels.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/test/test_charts_textlabels.py,v 1.2 2001/11/26 21:49:01 andy_robinson Exp $
+#$Header: /tmp/reportlab/reportlab/test/test_charts_textlabels.py,v 1.3 2002/07/04 09:24:49 dinu_gherman Exp $
 """
 Tests for the text Label class.
 """
@@ -10,6 +10,7 @@
 from os.path import join, basename, splitext
 
 from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
 from reportlab.lib import colors
 from reportlab.lib.units import cm
 from reportlab.lib.pagesizes import A4
@@ -263,8 +264,7 @@
             story.append(d)
             story.append(Spacer(0, 1*cm))
 
-        story.append(PageBreak())
-        
+        story.append(PageBreak())        
 
         pdfPath = 'test_charts_textlabels.pdf'
         tempfile.tempdir = os.curdir
@@ -274,9 +274,7 @@
 
 
 def makeSuite():
-    suite = unittest.TestSuite()
-    suite.addTest(LabelTestCase('test1'))
-    return suite
+    return makeSuiteForClasses(LabelTestCase)
 
 
 #noruntests
--- a/reportlab/test/test_docs_build.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_docs_build.py	Thu Jul 04 09:24:49 2002 +0000
@@ -11,7 +11,7 @@
 class ManualTestCase(SecureTestCase):
     "Runs all 3 manual-builders from the top."
     
-    def test1(self):
+    def test0(self):
         "Test if all manuals buildable from source."
 
         import reportlab
@@ -38,9 +38,9 @@
 
 def makeSuite():
     suite = unittest.TestSuite()
-    
+    loader = unittest.TestLoader()
     if sys.platform[:4] != 'java':
-        suite.addTest(ManualTestCase('test1'))
+        suite.addTest(loader.loadTestsFromTestCase(ManualTestCase))
 
     return suite
 
--- a/reportlab/test/test_docstrings.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_docstrings.py	Thu Jul 04 09:24:49 2002 +0000
@@ -2,7 +2,7 @@
 #copyright ReportLab Inc. 2000-2001
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/test/test_docstrings.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/test/test_docstrings.py,v 1.8 2002/05/24 14:38:09 dinu_gherman Exp $
+#$Header: /tmp/reportlab/reportlab/test/test_docstrings.py,v 1.9 2002/07/04 09:24:49 dinu_gherman Exp $
 
 """This is a test on a package level that find all modules,
 classes, methods and functions that do not have a doc string
@@ -152,25 +152,25 @@
         file.close()
 
 
-    def test1(self):
+    def test0(self):
         "Test if functions have a doc string."
 
         self._writeLogFile(FunctionType)
 
 
-    def test2(self):
+    def test1(self):
         "Test if classes have a doc string."
 
         self._writeLogFile(ClassType)
 
 
-    def test3(self):
+    def test2(self):
         "Test if methods have a doc string."
 
         self._writeLogFile(MethodType)
 
 
-    def test4(self):
+    def test3(self):
         "Test if modules have a doc string."
 
         self._writeLogFile(ModuleType)
@@ -178,12 +178,9 @@
 
 def makeSuite():
     suite = unittest.TestSuite()
-
+    loader = unittest.TestLoader()
     if sys.platform[:4] != 'java':
-        suite.addTest(DocstringTestCase('test1'))
-        suite.addTest(DocstringTestCase('test2'))
-        suite.addTest(DocstringTestCase('test3'))
-        suite.addTest(DocstringTestCase('test4'))
+        suite.addTest(loader.loadTestsFromTestCase(DocstringTestCase))
 
     return suite
 
--- a/reportlab/test/test_extra.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_extra.py	Thu Jul 04 09:24:49 2002 +0000
@@ -42,7 +42,7 @@
         $HOME/bar/foo.py
     """
 
-    def test1(self):
+    def test0(self):
         "Execute external test cases."
 
         cwd = os.getcwd()
@@ -85,10 +85,10 @@
 
 def makeSuite():
     suite = unittest.TestSuite()
-    
-    if sys.platform[:4] != 'java':   
-        suite.addTest(ExternalTestCase('test1'))
-    
+    loader = unittest.TestLoader()
+    if sys.platform[:4] != 'java':
+        suite.addTest(loader.loadTestsFromTestCase(ExternalTestCase))
+
     return suite
 
 
--- a/reportlab/test/test_graphics_charts.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_graphics_charts.py	Thu Jul 04 09:24:49 2002 +0000
@@ -1,7 +1,7 @@
 #copyright ReportLab Inc. 2000-2001
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/test/test_graphics_charts.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/test/test_graphics_charts.py,v 1.12 2001/06/19 09:56:29 dinu_gherman Exp $
+#$Header: /tmp/reportlab/reportlab/test/test_graphics_charts.py,v 1.13 2002/07/04 09:24:49 dinu_gherman Exp $
 """
 Tests for chart class.
 """
@@ -10,6 +10,7 @@
 from os.path import join, basename, splitext
 
 from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
 from reportlab.lib import colors
 from reportlab.lib.units import cm
 from reportlab.lib.pagesizes import A4
@@ -194,7 +195,7 @@
             doc.build(self.story)
 
 
-    def test1(self):
+    def test0(self):
         "Test bar charts."
 
         story = self.story
@@ -206,7 +207,7 @@
         story.append(Spacer(0, 1*cm))
         
 
-    def test2(self):
+    def test1(self):
         "Test bar charts."
 
         story = self.story
@@ -218,7 +219,7 @@
         story.append(Spacer(0, 1*cm))
         
 
-    def test3(self):
+    def test2(self):
         "Test bar charts."
 
         story = self.story
@@ -231,7 +232,7 @@
         story.append(Spacer(0, 1*cm))
 
         
-    def test4(self):
+    def test3(self):
         "Test line charts."
 
         story = self.story
@@ -243,7 +244,7 @@
         story.append(Spacer(0, 1*cm))
         
 
-    def test5(self):
+    def test4(self):
         "Test line charts."
 
         story = self.story
@@ -255,7 +256,7 @@
         story.append(Spacer(0, 1*cm))
         
 
-    def test6(self):
+    def test5(self):
         "Test pie charts."
 
         story = self.story
@@ -272,14 +273,7 @@
 
 
 def makeSuite():
-    suite = unittest.TestSuite()
-    suite.addTest(ChartTestCase('test1'))
-    suite.addTest(ChartTestCase('test2'))
-    suite.addTest(ChartTestCase('test3'))
-    suite.addTest(ChartTestCase('test4'))
-    suite.addTest(ChartTestCase('test5'))
-    suite.addTest(ChartTestCase('test6'))
-    return suite
+    return makeSuiteForClasses(ChartTestCase)
 
 
 #noruntests
--- a/reportlab/test/test_graphics_images.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_graphics_images.py	Thu Jul 04 09:24:49 2002 +0000
@@ -7,6 +7,8 @@
 import os
 
 from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
+
 from reportlab.graphics.shapes import Image, Drawing
 from reportlab.graphics import renderPDF
 from reportlab.lib.pagesizes import A4
@@ -78,12 +80,7 @@
 
 
 def makeSuite():
-    suite = unittest.TestSuite()
-    suite.addTest(ImageTestCase('test0'))
-    suite.addTest(ImageTestCase('test1'))
-    suite.addTest(ImageTestCase('test2'))
-    suite.addTest(ImageTestCase('test3'))
-    return suite
+    return makeSuiteForClasses(ImageTestCase)
 
 
 #noruntests
--- a/reportlab/test/test_graphics_speed.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_graphics_speed.py	Thu Jul 04 09:24:49 2002 +0000
@@ -1,7 +1,7 @@
 #copyright ReportLab Inc. 2000-2001
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/test/test_graphics_speed.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/test/test_graphics_speed.py,v 1.10 2001/06/19 09:56:29 dinu_gherman Exp $
+#$Header: /tmp/reportlab/reportlab/test/test_graphics_speed.py,v 1.11 2002/07/04 09:24:49 dinu_gherman Exp $
 """
 This does a test drawing with lots of things in it, running
 with and without attribute checking.
@@ -14,6 +14,7 @@
 
 import reportlab.rl_config
 from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
 from reportlab.lib import colors
 from reportlab.lib.units import cm
 from reportlab.pdfgen.canvas import Canvas
@@ -26,7 +27,7 @@
 class GraphicsSpeedTestCase(unittest.TestCase):
     "Test speed of the graphics rendering process."
     
-    def test1(self, isFast=0):
+    def test0(self, isFast=0):
         """Hello World, on a rectangular background.
 
         The rectangle's fillColor is yellow.
@@ -61,13 +62,13 @@
         open('test_graphics_speed_test%s.log' % (isFast+1), 'w').write(result)
 
 
-    def test2(self, isFast=1):
+    def test1(self, isFast=1):
         "Same as test1(), but with shape checking turned on."
 
-        self.test1(isFast)
+        self.test0(isFast)
 
         
-    def test3(self):
+    def test2(self):
         "This is a profiled version of test1()."
 
         fileName = 'test_graphics_speed_profile.log'
@@ -77,11 +78,7 @@
 
 
 def makeSuite():
-    suite = unittest.TestSuite()
-    suite.addTest(GraphicsSpeedTestCase('test1'))
-    suite.addTest(GraphicsSpeedTestCase('test2'))
-    suite.addTest(GraphicsSpeedTestCase('test3'))
-    return suite
+    return makeSuiteForClasses(GraphicsSpeedTestCase)
 
 
 #noruntests
--- a/reportlab/test/test_hello.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_hello.py	Thu Jul 04 09:24:49 2002 +0000
@@ -2,7 +2,7 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/pdfgen/test/test_hello.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/test/test_hello.py,v 1.1 2001/11/26 21:49:01 andy_robinson Exp $
+#$Header: /tmp/reportlab/reportlab/test/test_hello.py,v 1.2 2002/07/04 09:24:49 dinu_gherman Exp $
 __version__=''' $Id'''
 __doc__="""most basic test possible that makes a PDF.
 
@@ -10,25 +10,24 @@
 since the output is about the smallest thing we can make."""
 
 from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
 from reportlab.pdfgen.canvas import Canvas
 
-def run():
-    c = Canvas('test_hello.pdf')
-    c.setFont('Helvetica-Bold', 36)
-    c.drawString(100,700, 'Hello World')
-    c.save()
-
 
 class HelloTestCase(unittest.TestCase):
     "Simplest test that makes PDF"
+
     def test(self):
-        run()
+        c = Canvas('test_hello.pdf')
+        c.setFont('Helvetica-Bold', 36)
+        c.drawString(100,700, 'Hello World')
+        c.save()
+
 
 def makeSuite():
-    suite = unittest.TestSuite()
-    suite.addTest(HelloTestCase('test'))
-    return suite
+    return makeSuiteForClasses(HelloTestCase)
+
 
-if __name__ == "__main__": #NORUNTESTS
+#noruntests
+if __name__ == "__main__":
     unittest.TextTestRunner().run(makeSuite())
-
--- a/reportlab/test/test_lib_colors.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_lib_colors.py	Thu Jul 04 09:24:49 2002 +0000
@@ -1,7 +1,7 @@
 #copyright ReportLab Inc. 2000-2001
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/test/test_lib_colors.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/test/test_lib_colors.py,v 1.6 2001/04/05 09:30:12 rgbecker Exp $
+#$Header: /tmp/reportlab/reportlab/test/test_lib_colors.py,v 1.7 2002/07/04 09:24:49 dinu_gherman Exp $
 """Tests for the reportlab.lib.colors module.
 """
 
@@ -9,6 +9,8 @@
 import os, math
 
 from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
+
 from reportlab.pdfgen.canvas import Canvas
 import reportlab.pdfgen.canvas
 from reportlab.lib import colors
@@ -35,7 +37,7 @@
 class ColorTestCase(unittest.TestCase):
     ""
     
-    def test1(self):
+    def test0(self):
         "Test color2bw function on all named colors."
 
         cols = colors.getAllNamedColors().values()
@@ -45,7 +47,7 @@
             assert r == g == b
     
 
-    def test2(self):
+    def test1(self):
         "Test colorDistance function."
 
         cols = colors.getAllNamedColors().values()
@@ -54,7 +56,7 @@
             assert d == 0
 
 
-    def test3(self):
+    def test2(self):
         "Test toColor function on half a dozen ways to say 'red'."
 
         allRed = [colors.red, [1, 0, 0], (1, 0, 0),
@@ -64,7 +66,7 @@
             assert colors.toColor(thing) == colors.red
 
 
-    def test4(self):
+    def test3(self):
         "Test roundtrip RGB to CMYK conversion."
 
         # Take all colors as test subjects, except 'transparent'.
@@ -85,7 +87,7 @@
             deltas = map(abs, (r1-r2, g1-g2, b1-b2))
             assert deltas < [math.pow(10, -N)] * 3
 
-    def test5(self):
+    def test4(self):
         "Construct CMYK instances and test round trip conversion"
 
         rgbCols = colors.getAllNamedColors().items()
@@ -105,7 +107,7 @@
             assert deltas < [math.pow(10, -N)] * 3
 
 
-    def test6(self):
+    def test5(self):
         "List and display all named colors and their gray equivalents."
         
         canvas = reportlab.pdfgen.canvas.Canvas('test_lib_colors.pdf')
@@ -151,16 +153,8 @@
         
 
 def makeSuite():
-    suite = unittest.TestSuite()
-    
-    suite.addTest(ColorTestCase('test1'))
-    suite.addTest(ColorTestCase('test2'))
-    suite.addTest(ColorTestCase('test3'))
-    suite.addTest(ColorTestCase('test4'))
-    suite.addTest(ColorTestCase('test5'))
-    suite.addTest(ColorTestCase('test6'))
+    return makeSuiteForClasses(ColorTestCase)
 
-    return suite
 
 #noruntests
 if __name__ == "__main__":
--- a/reportlab/test/test_lib_sequencer.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_lib_sequencer.py	Thu Jul 04 09:24:49 2002 +0000
@@ -1,7 +1,7 @@
 #copyright ReportLab Inc. 2000-2001
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/test/test_lib_sequencer.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/test/test_lib_sequencer.py,v 1.4 2001/04/05 09:30:12 rgbecker Exp $
+#$Header: /tmp/reportlab/reportlab/test/test_lib_sequencer.py,v 1.5 2002/07/04 09:24:49 dinu_gherman Exp $
 """Tests for the reportlab.lib.sequencer module.
 """
 
@@ -9,13 +9,14 @@
 import sys, random
 
 from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
 from reportlab.lib.sequencer import Sequencer
 
 
 class SequencerTestCase(unittest.TestCase):
     "Test Sequencer usage."
     
-    def test1(self):
+    def test0(self):
         "Test sequencer default counter."
 
         seq = Sequencer()
@@ -23,7 +24,7 @@
         assert seq.this() == 0, msg
 
 
-    def test2(self):
+    def test1(self):
         "Test incrementing default counter."
 
         seq = Sequencer()
@@ -34,7 +35,7 @@
             assert seq.this() == n, msg
 
 
-    def test3(self):
+    def test2(self):
         "Test resetting default counter."
 
         seq = Sequencer()
@@ -49,7 +50,7 @@
         assert seq.this() == start, msg
 
 
-    def test4(self):
+    def test3(self):
         "Test incrementing dedicated counter."
 
         seq = Sequencer()
@@ -60,7 +61,7 @@
             assert seq.this('myCounter1') == n, msg
 
 
-    def test5(self):
+    def test4(self):
         "Test resetting dedicated counter."
 
         seq = Sequencer()
@@ -75,7 +76,7 @@
         assert seq.this('myCounter1') == start, msg
 
 
-    def test6(self):
+    def test5(self):
         "Test incrementing multiple dedicated counters."
 
         seq = Sequencer()
@@ -114,16 +115,7 @@
 
 
 def makeSuite():
-    suite = unittest.TestSuite()
-    
-    suite.addTest(SequencerTestCase('test1'))
-    suite.addTest(SequencerTestCase('test2'))
-    suite.addTest(SequencerTestCase('test3'))
-    suite.addTest(SequencerTestCase('test4'))
-    suite.addTest(SequencerTestCase('test5'))
-    suite.addTest(SequencerTestCase('test6'))
-
-    return suite
+    return makeSuiteForClasses(SequencerTestCase)
 
 
 #noruntests
--- a/reportlab/test/test_lib_validators.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_lib_validators.py	Thu Jul 04 09:24:49 2002 +0000
@@ -2,6 +2,7 @@
 """
 
 from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
 from reportlab.lib import colors
 from reportlab.lib import validators
 
@@ -155,21 +156,9 @@
 
 
 def makeSuite():
-	suite = unittest.TestSuite()
-	
-	suite.addTest(ValidatorTestCase('test0'))
-	suite.addTest(ValidatorTestCase('test1'))
-	suite.addTest(ValidatorTestCase('test2'))
-	suite.addTest(ValidatorTestCase('test4'))
-	suite.addTest(ValidatorTestCase('test5'))
-	suite.addTest(ValidatorTestCase('test6'))
-	suite.addTest(ValidatorTestCase('test7'))
-	suite.addTest(ValidatorTestCase('test8'))
-
-	return suite
+    return makeSuiteForClasses(ValidatorTestCase)
 
 
 #noruntests
 if __name__ == "__main__":
-	unittest.TextTestRunner().run(makeSuite())
-	
+    unittest.TextTestRunner().run(makeSuite())
--- a/reportlab/test/test_multibyte_chs.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_multibyte_chs.py	Thu Jul 04 09:24:49 2002 +0000
@@ -1,7 +1,7 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history www.reportlab.co.uk/rl-cgi/viewcvs.cgi/rlextra/rlj/jpsupport.py
-#$Header: /tmp/reportlab/reportlab/test/test_multibyte_chs.py,v 1.2 2001/10/28 00:22:18 andy_robinson Exp $
+#$Header: /tmp/reportlab/reportlab/test/test_multibyte_chs.py,v 1.3 2002/07/04 09:24:49 dinu_gherman Exp $
 # Temporary japanese support for ReportLab.
 """
 The code in this module will disappear any day now and be replaced
@@ -12,6 +12,7 @@
 import string, os
 
 from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
 
 from reportlab.pdfbase import pdfmetrics
 from reportlab.pdfgen.canvas import Canvas
@@ -24,13 +25,13 @@
 
 class CHSFontTests(unittest.TestCase):
     
-    def test1(self):
+    def test0(self):
         "A basic document drawing some strings"
 
         # if they do not have the Japanese font files, go away quietly
         from reportlab.pdfbase.cidfonts import CIDFont, findCMapFile
 
-        
+
         enc = 'GB-EUC-H'
         try:
             findCMapFile(enc)
@@ -104,14 +105,13 @@
         if VERBOSE:
             print 'saved test_multibyte_chs.pdf'
 
+
 def makeSuite():
-    return unittest.makeSuite(CHSFontTests,'test')
+    return makeSuiteForClasses(CHSFontTests)
+
 
 #noruntests
 if __name__ == "__main__":
     VERBOSE = 1
     unittest.TextTestRunner().run(makeSuite())
-    
 
-
-
--- a/reportlab/test/test_multibyte_cht.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_multibyte_cht.py	Thu Jul 04 09:24:49 2002 +0000
@@ -1,7 +1,7 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history www.reportlab.co.uk/rl-cgi/viewcvs.cgi/rlextra/rlj/jpsupport.py
-#$Header: /tmp/reportlab/reportlab/test/test_multibyte_cht.py,v 1.4 2001/11/06 03:02:44 andy_robinson Exp $
+#$Header: /tmp/reportlab/reportlab/test/test_multibyte_cht.py,v 1.5 2002/07/04 09:24:49 dinu_gherman Exp $
 # Temporary japanese support for ReportLab.
 """
 Test of traditional Chinese (as written in Taiwan)
@@ -11,6 +11,7 @@
 import string, os
 
 from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
 
 from reportlab.pdfbase import pdfmetrics
 from reportlab.pdfgen.canvas import Canvas
@@ -22,13 +23,15 @@
 
 
 class CHTFontTests(unittest.TestCase):
+
     def hDraw(self, c, msg, fnt, x, y):
         "Helper - draws it with a box around"
         c.setFont(fnt, 16, 16)
         c.drawString(x, y, msg)
         c.rect(x,y,pdfmetrics.stringWidth(msg, fnt, 16),16,stroke=1,fill=0)
         
-    def test1(self):
+
+    def test0(self):
         "A basic document drawing some strings"
 
         # if they do not have the Japanese font files, go away quietly
@@ -124,14 +127,13 @@
         if VERBOSE:
             print 'saved test_multibyte_cht.pdf'
 
+
 def makeSuite():
-    return unittest.makeSuite(CHTFontTests,'test')
+    return makeSuiteForClasses(CHTFontTests)
+
 
 #noruntests
 if __name__ == "__main__":
     VERBOSE = 1
     unittest.TextTestRunner().run(makeSuite())
-    
 
-
-
--- a/reportlab/test/test_multibyte_jpn.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_multibyte_jpn.py	Thu Jul 04 09:24:49 2002 +0000
@@ -1,7 +1,7 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history www.reportlab.co.uk/rl-cgi/viewcvs.cgi/rlextra/rlj/jpsupport.py
-#$Header: /tmp/reportlab/reportlab/test/test_multibyte_jpn.py,v 1.2 2001/11/06 03:02:44 andy_robinson Exp $
+#$Header: /tmp/reportlab/reportlab/test/test_multibyte_jpn.py,v 1.3 2002/07/04 09:24:49 dinu_gherman Exp $
 # Temporary japanese support for ReportLab.
 """
 The code in this module will disappear any day now and be replaced
@@ -12,6 +12,7 @@
 import string, os
 
 from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
 
 from reportlab.pdfbase import pdfmetrics
 from reportlab.pdfgen.canvas import Canvas
@@ -22,13 +23,14 @@
 
 
 class JapaneseFontTests(unittest.TestCase):
+
     def hDraw(self, c, msg, fnt, x, y):
         "Helper - draws it with a box around"
         c.setFont(fnt, 16, 16)
         c.drawString(x, y, msg)
         c.rect(x,y,pdfmetrics.stringWidth(msg, fnt, 16),16,stroke=1,fill=0)
         
-    def test1(self):
+    def test0(self):
         "A basic document drawing some strings"
 
         # if they do not have the Japanese font files, go away quietly
@@ -270,14 +272,14 @@
         if VERBOSE:
             print 'saved test_multibyte_jpn.pdf'
 
+
 def makeSuite():
-    return unittest.makeSuite(JapaneseFontTests,'test')
+    return makeSuiteForClasses(JapaneseFontTests)
+
 
 #noruntests
 if __name__ == "__main__":
     VERBOSE = 1
     unittest.TextTestRunner().run(makeSuite())
-    
 
 
-
--- a/reportlab/test/test_multibyte_kor.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_multibyte_kor.py	Thu Jul 04 09:24:49 2002 +0000
@@ -2,6 +2,7 @@
 import string, os
 
 from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
 
 from reportlab.pdfbase import pdfmetrics
 from reportlab.pdfgen.canvas import Canvas
@@ -14,7 +15,8 @@
 
 
 class KoreanFontTests(unittest.TestCase):
-    def test1(self):
+
+    def test0(self):
 
         # if they do not have the font files or encoding, go away quietly
         try:
@@ -104,8 +106,6 @@
                 c.showPage()
                 y = 700
 
-
-
         c.save()
         
         if VERBOSE:
@@ -113,15 +113,11 @@
         
 
 def makeSuite():
-    suite = unittest.TestSuite()
-    suite.addTest(KoreanFontTests('test1'))
-    return suite
+    return makeSuiteForClasses(KoreanFontTests)
+
 
 #noruntests
 if __name__ == "__main__":
     VERBOSE = 1
     unittest.TextTestRunner().run(makeSuite())
-    
 
-
-
--- a/reportlab/test/test_paragraphs.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_paragraphs.py	Thu Jul 04 09:24:49 2002 +0000
@@ -1,10 +1,12 @@
 #copyright ReportLab Inc. 2000-2001
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/test/test_paragraphs.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/test/test_paragraphs.py,v 1.11 2001/08/22 19:58:39 johnprecedo Exp $
+#$Header: /tmp/reportlab/reportlab/test/test_paragraphs.py,v 1.12 2002/07/04 09:24:49 dinu_gherman Exp $
 # tests some paragraph styles
 
 from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
+
 from reportlab.platypus import Paragraph, SimpleDocTemplate, XBox
 from reportlab.lib.styles import ParagraphStyle
 from reportlab.lib.units import inch
@@ -40,7 +42,7 @@
 class ParagraphTestCase(unittest.TestCase):
     "Test Paragraph class (eyeball-test)."
     
-    def test1(self):
+    def test0(self):
         """Test...
 
         The story should contain...
@@ -125,9 +127,7 @@
         
 
 def makeSuite():
-    suite = unittest.TestSuite()
-    suite.addTest(ParagraphTestCase('test1'))
-    return suite
+    return makeSuiteForClasses(ParagraphTestCase)
 
 
 #noruntests
--- a/reportlab/test/test_pdfbase_encodings.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_pdfbase_encodings.py	Thu Jul 04 09:24:49 2002 +0000
@@ -1,11 +1,16 @@
+from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
+
 from reportlab.pdfgen.canvas import Canvas
 from reportlab.pdfbase import pdfmetrics
-from reportlab.test import unittest
+
 
 class EncodingTestCase(unittest.TestCase):
     "Make documents with custom encodings"
-    def testEncodings(self):
+
+    def test0(self):
         "Make custom encodings of standard fonts"
+
         # make a custom encoded font.
         c = Canvas('test_pdfbase_encodings.pdf')
         c.setPageCompression(0)
@@ -23,7 +28,6 @@
         # now we can make a font based on this encoding
         f = pdfmetrics.Font('FontWithoutVowels', 'Helvetica-Oblique', 'EncodingWithoutVowels')
         pdfmetrics.registerFont(f)
-        
 
         c.setFont('FontWithoutVowels', 12)
         c.drawString(125, 675, "The magic word is squamish ossifrage")
@@ -85,11 +89,9 @@
 
 
 def makeSuite():
-    suite = unittest.TestSuite()
-    suite.addTest(EncodingTestCase('testEncodings'))
-    return suite
+    return makeSuiteForClasses(EncodingTestCase)
 
-    
+
+#noruntests
 if __name__ == "__main__":
     unittest.TextTestRunner().run(makeSuite())
-
--- a/reportlab/test/test_pdfbase_fontembed.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_pdfbase_fontembed.py	Thu Jul 04 09:24:49 2002 +0000
@@ -1,12 +1,17 @@
 import os
+
+from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
+
 from reportlab.pdfgen.canvas import Canvas
 from reportlab.pdfbase import pdfmetrics
-from reportlab.test import unittest
 from reportlab.test.test_pdfbase_pdfmetrics import makeWidthTestForAllGlyphs
 
+
 class EmbeddingTestCase(unittest.TestCase):
     "Make documents with embedded fonts"
-    def testEmbedding(self):
+
+    def test0(self):
         """Make documents with embedded fonts.
 
         Just vam Rossum has kindly donated a font which we may use
@@ -14,7 +19,6 @@
         if you want to use it for real."""
 
         #LettError fonts should always be there.  The others are voluntary.
-
         
         ok = 1
         
@@ -23,7 +27,6 @@
         c.setFont('Helvetica', 12)
         c.drawString(100, 700, 'This is Helvetica.  The text below should be different fonts...')
 
-
         if os.path.isfile('GDB_____.AFM') and os.path.isfile('GDB_____.PFB'):
             # a normal text font
             garaFace = pdfmetrics.EmbeddedType1Face('GDB_____.AFM','GDB_____.PFB')
@@ -46,7 +49,6 @@
             cartaFont = pdfmetrics.Font('Carta', 'Carta', 'CartaEncoding')
             pdfmetrics.registerFont(cartaFont)
 
-
             text = 'This should be in Carta, a map symbol font:'
             c.setFont('Helvetica', 12)
             c.drawString(100, 600, text)
@@ -54,7 +56,6 @@
             
             c.setFont('Carta', 12)
             c.drawString(100+w, 600, ' Hello World')
-                   
 
         # LettError sample - creates on demand, we hope
         y = 550
@@ -80,11 +81,10 @@
 
 
 def makeSuite():
-    suite = unittest.TestSuite()
-    suite.addTest(EmbeddingTestCase('testEmbedding'))
-    return suite
+    return makeSuiteForClasses(EmbeddingTestCase)
 
-    
+
+#noruntests
 if __name__ == "__main__":
     unittest.TextTestRunner().run(makeSuite())
 
--- a/reportlab/test/test_pdfbase_pdfmetrics.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_pdfbase_pdfmetrics.py	Thu Jul 04 09:24:49 2002 +0000
@@ -1,7 +1,7 @@
 #copyright ReportLab Inc. 2000-2001
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/test/test_pdfbase_pdfmetrics.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/test/test_pdfbase_pdfmetrics.py,v 1.8 2002/04/09 11:46:43 johnprecedo Exp $
+#$Header: /tmp/reportlab/reportlab/test/test_pdfbase_pdfmetrics.py,v 1.9 2002/07/04 09:24:49 dinu_gherman Exp $
 #test_pdfbase_pdfmetrics_widths
 """
 Various tests for PDF metrics.
@@ -9,7 +9,9 @@
 The main test prints out a PDF documents enabling checking of widths of every
 glyph in every standard font.  Long!
 """
+
 from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
 
 from reportlab.pdfbase import pdfmetrics
 from reportlab.pdfbase import _fontdata
@@ -19,11 +21,13 @@
 verbose = 0
 fontNamesToTest = _fontdata.standardFonts #[0:12]  #leaves out Symbol and Dingbats for now
 
+
 def decoratePage(c, header):
     c.setFont('Helvetica-Oblique',10)
     c.drawString(72, 800, header)
     c.drawCentredString(297, 54, 'Page %d' % c.getPageNumber())
 
+
 def makeWidthTestForAllGlyphs(canv, fontName, outlining=1):
     """New page, then runs down doing all the glyphs in one encoding"""
     thisFont = pdfmetrics.getFont(fontName)
@@ -66,7 +70,6 @@
             y = y - 12
                 
 
-
 def makeTestDoc(fontNames):
     filename = 'test_pdfbase_pdfmetrics.pdf'
     c = Canvas(filename)
@@ -86,14 +89,17 @@
         if verbose:
             print 'saved',filename
 
+
 class PDFMetricsTestCase(unittest.TestCase):
     "Test various encodings used in PDF files."
-    def testGlyphWidthsAreCorrect(self):
-        "Visual test for glyph widths"
+
+    def test0(self):
+        "Visual test for correct glyph widths"
         makeTestDoc(fontNamesToTest)        
 
+
 def makeSuite():
-    return unittest.makeSuite(PDFMetricsTestCase,'test')
+    return makeSuiteForClasses(PDFMetricsTestCase)
 
 
 #noruntests
@@ -113,5 +119,4 @@
                 
         fontNamesToTest = sys.argv[1:]
 
-    runner = unittest.TextTestRunner()
-    runner.run(makeSuite())
+    unittest.TextTestRunner().run(makeSuite())
--- a/reportlab/test/test_pdfbase_pdfutils.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_pdfbase_pdfutils.py	Thu Jul 04 09:24:49 2002 +0000
@@ -1,7 +1,7 @@
 #copyright ReportLab Inc. 2000-2001
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/test/test_pdfbase_pdfutils.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/test/test_pdfbase_pdfutils.py,v 1.4 2001/09/05 11:47:21 rgbecker Exp $
+#$Header: /tmp/reportlab/reportlab/test/test_pdfbase_pdfutils.py,v 1.5 2002/07/04 09:24:49 dinu_gherman Exp $
 """Tests for utility functions in reportlab.pdfbase.pdfutils.
 """
 
@@ -9,6 +9,8 @@
 import os
 
 from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
+
 from reportlab.pdfbase.pdfutils import _AsciiHexEncode, _AsciiHexDecode
 from reportlab.pdfbase.pdfutils import _AsciiBase85Encode, _AsciiBase85Decode
 
@@ -42,15 +44,9 @@
 
 
 def makeSuite():
-    suite = unittest.TestSuite()
-    
-    suite.addTest(PdfEncodingTestCase('testAsciiHex'))
-    suite.addTest(PdfEncodingTestCase('testAsciiBase85'))
-
-    return suite
+    return makeSuiteForClasses(PdfEncodingTestCase)
 
 
 #noruntests
 if __name__ == "__main__":
     unittest.TextTestRunner().run(makeSuite())
-    
--- a/reportlab/test/test_pdfbase_ttfonts.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_pdfbase_ttfonts.py	Thu Jul 04 09:24:49 2002 +0000
@@ -1,3 +1,4 @@
+
 """Test TrueType font subsetting & embedding code.
 
 This test uses a sample font (luxiserif.ttf) taken from XFree86 which is called Luxi
@@ -6,7 +7,10 @@
 
 import string
 from cStringIO import StringIO
+
 from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
+
 from reportlab.pdfgen.canvas import Canvas
 from reportlab.pdfbase import pdfmetrics
 from reportlab.pdfbase.pdfdoc import PDFDocument, PDFError
@@ -16,6 +20,7 @@
                                       FF_SYMBOLIC, FF_NONSYMBOLIC, \
                                       calcChecksum, _add32
 
+
 def utf8(code):
     "Convert a given UCS character index into UTF-8"
     if code < 0 or code > 0x7FFFFFFF:
@@ -53,6 +58,7 @@
                   0x80 + ((code >> 6) & 0x3F),
                   0x80 + (code & 0x3F))
 
+
 class TTFontsTestCase(unittest.TestCase):
     "Make documents with TrueType fonts"
 
@@ -80,6 +86,7 @@
         c.drawString(100, 700, 'Hello, ' + utf8(0xffee))
         c.save()
 
+
 class TTFontFileTestCase(unittest.TestCase):
     "Tests TTFontFile, TTFontParser and TTFontMaker classes"
 
@@ -183,6 +190,7 @@
         self.assertEquals(ttf.get_table("ABCD"), "xyzzy")
         self.assertEquals(ttf.get_table("QUUX"), "123")
 
+
 class TTFontFaceTestCase(unittest.TestCase):
     "Tests TTFontFace class"
 
@@ -326,14 +334,17 @@
 end
 end""")
 
+
 def makeSuite():
-    suite = unittest.TestSuite()
-    loader = unittest.TestLoader()
-    suite.addTest(loader.loadTestsFromTestCase(TTFontsTestCase))
-    suite.addTest(loader.loadTestsFromTestCase(TTFontFileTestCase))
-    suite.addTest(loader.loadTestsFromTestCase(TTFontFaceTestCase))
-    suite.addTest(loader.loadTestsFromTestCase(TTFontTestCase))
+    suite = makeSuiteForClasses(
+        TTFontsTestCase, 
+        TTFontFileTestCase,
+        TTFontFaceTestCase, 
+        TTFontTestCase)
     return suite
 
+
+#noruntests
 if __name__ == "__main__":
     unittest.TextTestRunner().run(makeSuite())
+
--- a/reportlab/test/test_pdfgen_callback.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_pdfgen_callback.py	Thu Jul 04 09:24:49 2002 +0000
@@ -2,23 +2,26 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/pdfgen/test/test_pdfgen_callback.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/test/test_pdfgen_callback.py,v 1.1 2002/02/03 21:25:57 andy_robinson Exp $
-__version__=''' $Id: test_pdfgen_callback.py,v 1.1 2002/02/03 21:25:57 andy_robinson Exp $ '''
+#$Header: /tmp/reportlab/reportlab/test/test_pdfgen_callback.py,v 1.2 2002/07/04 09:24:49 dinu_gherman Exp $
+__version__=''' $Id: test_pdfgen_callback.py,v 1.2 2002/07/04 09:24:49 dinu_gherman Exp $ '''
 __doc__='checks callbacks work'
 
 from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
+
 from reportlab.pdfgen.canvas import Canvas
 from reportlab.test.test_pdfgen_general import makeDocument
 
 _PAGE_COUNT = 0
 
+
 class CallBackTestCase(unittest.TestCase):
     "checks it gets called"
         
     def callMe(self, pageNo):
         self.pageCount = pageNo
 
-    def test1(self):
+    def test0(self):
         "Make a PDFgen document with most graphics features"
 
         self.pageCount = 0
@@ -28,10 +31,9 @@
 
 
 def makeSuite():
-    suite = unittest.TestSuite()
-    suite.addTest(CallBackTestCase('test1'))
-    return suite
+    return makeSuiteForClasses(CallBackTestCase)
 
-    
+
+#noruntests
 if __name__ == "__main__":
     unittest.TextTestRunner().run(makeSuite())
--- a/reportlab/test/test_pdfgen_general.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_pdfgen_general.py	Thu Jul 04 09:24:49 2002 +0000
@@ -2,16 +2,20 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/pdfgen/test/testpdfgen.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/test/test_pdfgen_general.py,v 1.13 2002/05/24 11:25:54 dinu_gherman Exp $
-__version__=''' $Id: test_pdfgen_general.py,v 1.13 2002/05/24 11:25:54 dinu_gherman Exp $ '''
+#$Header: /tmp/reportlab/reportlab/test/test_pdfgen_general.py,v 1.14 2002/07/04 09:24:49 dinu_gherman Exp $
+__version__=''' $Id: test_pdfgen_general.py,v 1.14 2002/07/04 09:24:49 dinu_gherman Exp $ '''
 __doc__='testscript for reportlab.pdfgen'
 #tests and documents new low-level canvas
+
 import string
+
+from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
+
 from reportlab.pdfgen import canvas   # gmcm 2000/10/13, pdfgen now a package
 from reportlab.lib.units import inch, cm
 from reportlab.lib import colors
 from reportlab.lib.utils import PIL_Image
-from reportlab.test import unittest
 
 #################################################################
 #
@@ -54,6 +58,7 @@
 titlelist = []
 closeit = 0
     
+
 def framePage(canvas, title):
     global closeit
     titlelist.append(title)
@@ -72,16 +77,19 @@
     canvas.restoreState()
     canvas.doForm("frame")
     
+
 def makesubsection(canvas, title, horizontal):
     canvas.bookmarkHorizontalAbsolute(title, horizontal)
     #newsubsection(title)
     canvas.addOutlineEntry(title+" subsection", title, level=1)
     
+
 # outline helpers
 #outlinenametree = []
 #def newsection(name):
 #    outlinenametree.append(name)
     
+
 #def newsubsection(name):
 #    from types import TupleType
 #    thissection = outlinenametree[-1]
@@ -92,6 +100,7 @@
 #        (sectionname, subsectionlist) = thissection
 #    subsectionlist.append(name)
 
+
 class DocBlock:
     """A DocBlock has a chunk of commentary and a chunk of code.
     It prints the code and commentary, then executes the code,
@@ -136,7 +145,6 @@
 
         canvas.restoreState()
         
-
         
 def drawAxes(canvas, label):
     """draws a couple of little rulers showing the coords -
@@ -159,6 +167,7 @@
 
     canvas.drawString(18, 30, label)
 
+
 def drawCrossHairs(canvas, x, y):
     """just a marker for checking text metrics - blue for fun"""
 
@@ -168,6 +177,7 @@
     canvas.line(x,y-6,x,y+6)
     canvas.restoreState()
     
+
 def drawCode(canvas, code):
     """Draws a block of text at current point, indented and in Courier"""
     canvas.addLiteral('36 0 Td')
@@ -197,7 +207,6 @@
     framePage(c, 'PDFgen graphics API test script')
     makesubsection(c, "PDFgen and PIDDLE", 10*inch)
     
-    
     t = c.beginText(inch, 10*inch)
     t.setFont('Times-Roman', 10)
     drawCrossHairs(c, t.getX(),t.getY())
@@ -280,7 +289,6 @@
     #mark the cursor where it stopped
     c.showPage()
 
-
     
     ##############################################################
     #
@@ -385,9 +393,8 @@
     c.drawString(4*inch, 3*inch, 'dash pattern, join and cap style interacting - ')
     c.drawString(4*inch, 3*inch - 12, 'round join & miter results in sausages')
     
+    c.showPage()
 
-    
-    c.showPage()
 
 ##############################################################
 #
@@ -395,7 +402,6 @@
 #
 ###############################################################
     framePage(c, 'Shape Drawing Routines')
-    
 
     t = c.beginText(inch, 10*inch)
     t.textLines("""
@@ -426,7 +432,6 @@
     c.setDash()
     t.setTextOrigin(4*inch, 7 * inch)
     t.textLine('canvas.bezier(x1, y1, x2, y2, x3, y3, x4, y4)')
-    
 
     #rectangle
     makesubsection(c, "rectangles", 7*inch)
@@ -453,14 +458,14 @@
     t.setTextOrigin(4*inch, 2 * inch)
     t.textLine('canvas.circle(x, y, radius)')
     c.drawText(t)
+
+    c.showPage()
+
 ##############################################################
 #
 # Page 4 - fonts
 #
 ###############################################################
-
-    
-    c.showPage()
     framePage(c, "Font Control")
 
     c.drawString(inch, 10*inch, 'Listing available fonts...')
@@ -480,7 +485,6 @@
     modes, an outline color could be defined by setStrokeColorRGB() too""")
     c.drawText(t)
     
-    
     t = c.beginText(inch, 2.75 * inch)
     t.setFont('Times-Bold',36)
     t.setFillColor(colors.green)  #green
@@ -495,15 +499,13 @@
     t.setFillColorRGB(0,0,0)   #back to default
     t.setStrokeColorRGB(0,0,0) #ditto
     c.drawText(t)
-
+    c.showPage()
 
-    
 #########################################################################
 #
 #  Page 5 - coord transforms
 #
 #########################################################################
-    c.showPage()
     framePage(c, "Coordinate Transforms")
     c.setFont('Times-Roman', 12)
     t = c.beginText(inch, 10 * inch)
@@ -544,13 +546,13 @@
     drawAxes(c, "5. down 5, 3 across, skew beta 30")
     c.restoreState()
 
+    c.showPage()
     
 #########################################################################
 #
 #  Page 6 - clipping
 #
 #########################################################################
-    c.showPage()
     framePage(c, "Clipping")
     c.setFont('Times-Roman', 12)
     t = c.beginText(inch, 10 * inch)
@@ -589,7 +591,6 @@
     
     c.restoreState()
 
-
     t = c.beginText(inch, 5 * inch)
     t.textLines("""You can also use text as an outline for clipping with the text render mode.
         The API is not particularly clean on this and one has to follow the right sequence;
@@ -614,13 +615,14 @@
     #now reset canvas to get rid of the clipping mask    
     c.restoreState()
         
+    c.showPage()
+
 
 #########################################################################
 #
 #  Page 7 - images
 #
 #########################################################################
-    c.showPage()
     framePage(c, "Images")
     c.setFont('Times-Roman', 12)
     t = c.beginText(inch, 10 * inch)
@@ -677,13 +679,14 @@
     else:
         c.rect(3*inch, 1.2*inch, 110, 44)
 
+    c.showPage()
+
 
 #########################################################################
 #
 #  Page 8 - Forms and simple links
 #
 #########################################################################
-    c.showPage()
     framePage(c, "Forms and Links")
     c.setFont('Times-Roman', 12)
     t = c.beginText(inch, 10 * inch)
@@ -744,8 +747,10 @@
     c = makeDocument(filename)
     c.save()
 
+
 def pageShapes(c):
     """Demonstrates the basic lines and shapes"""
+
     c.showPage()
     framePage(c, "Basic line and shape routines""")
     c.setTextOrigin(inch, 10 * inch)
@@ -763,17 +768,20 @@
     
     d.draw(c, inch, 9 * inch)
 
+
 class PdfgenTestCase(unittest.TestCase):
     "Make documents with lots of Pdfgen features"
-    def test1(self):
+
+    def test0(self):
         "Make a PDFgen document with most graphics features"
         run('test_pdfgen_general.pdf')
 
+
 def makeSuite():
-    suite = unittest.TestSuite()
-    suite.addTest(PdfgenTestCase('test1'))
-    return suite
+    return makeSuiteForClasses(PdfgenTestCase)
 
-    
+
+#noruntests
 if __name__ == "__main__":
     unittest.TextTestRunner().run(makeSuite())
+
--- a/reportlab/test/test_pdfgen_pagemodes.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_pdfgen_pagemodes.py	Thu Jul 04 09:24:49 2002 +0000
@@ -1,7 +1,7 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/test/test_pdfgen_pagemodes.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/test/test_pdfgen_pagemodes.py,v 1.5 2001/06/07 18:14:21 rgbecker Exp $
+#$Header: /tmp/reportlab/reportlab/test/test_pdfgen_pagemodes.py,v 1.6 2002/07/04 09:24:49 dinu_gherman Exp $
 # full screen test
 
 """Tests for PDF page modes support in reportlab.pdfgen.
@@ -11,6 +11,8 @@
 import os
 
 from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
+
 from reportlab.pdfgen.canvas import Canvas
 
 
@@ -48,35 +50,29 @@
         assert fileDoesExist(filename)
 
 
-    def test1(self):
+    def test0(self):
         "This should open in full screen mode."
         
-        self._doTest('FullScreen.pdf', 'FullScreen', self.test1.__doc__)
+        self._doTest('FullScreen.pdf', 'FullScreen', self.test0.__doc__)
+
+
+    def test1(self):
+        "This should open with outline visible."
+
+        self._doTest('Outline.pdf', 'Outline', self.test1.__doc__)
 
 
     def test2(self):
-        "This should open with outline visible."
-
-        self._doTest('Outline.pdf', 'Outline', self.test2.__doc__)
-
-
-    def test3(self):
         "This should open in the user's default mode."
 
-        self._doTest('UseNone.pdf', 'UseNone', self.test3.__doc__)
+        self._doTest('UseNone.pdf', 'UseNone', self.test2.__doc__)
 
 
 def makeSuite():
-    suite = unittest.TestSuite()
-    
-    suite.addTest(PdfPageModeTestCase('test1'))
-    suite.addTest(PdfPageModeTestCase('test2'))
-    suite.addTest(PdfPageModeTestCase('test3'))
-
-    return suite
+    return makeSuiteForClasses(PdfPageModeTestCase)
 
 
 #noruntests
 if __name__ == "__main__":
-    unittest.TextTestRunner().run(makeSuite())
+    unittest.TextTestRunner().run(makeSuite)
     
--- a/reportlab/test/test_platypus_breaking.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_platypus_breaking.py	Thu Jul 04 09:24:49 2002 +0000
@@ -1,17 +1,18 @@
 #copyright ReportLab Inc. 2000-2001
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/test/test_platypus_paragraphs.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/test/test_platypus_breaking.py,v 1.3 2001/11/26 21:49:01 andy_robinson Exp $
+#$Header: /tmp/reportlab/reportlab/test/test_platypus_breaking.py,v 1.4 2002/07/04 09:24:49 dinu_gherman Exp $
 """Tests pageBreakBefore, frameBreakBefore, keepWithNext...
 """
 
 import sys, os, time
-
 from string import split, strip, join, whitespace
 from operator import truth
 from types import StringType, ListType
 
 from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
+
 from reportlab.platypus.flowables import Flowable
 from reportlab.lib import colors
 from reportlab.lib.units import cm
@@ -49,8 +50,9 @@
 		self.addPageTemplates(template)
 
 
-def _test1(self):
+def _test0(self):
 	"This makes one long multi-page paragraph."
+
 	# Build story.
 	story = []
 
@@ -73,9 +75,7 @@
 		Subsequent pages test pageBreakBefore, frameBreakBefore and
 		keepTogether attributes.  Generated at %s.  The number in brackets
 		at the end of each paragraph is its position in the story. (%d)""" % (
-			time.ctime(time.time()), len(story)),
-						   bt))
-
+			time.ctime(time.time()), len(story)), bt))
 
 	for i in range(10):
 		story.append(Paragraph('Heading 1 always starts a new page (%d)' % len(story), h1))
@@ -92,22 +92,23 @@
 				story.append(Paragraph('I should never be at the bottom of a frame (%d)' % len(story), h3))
 				story.append(Paragraph(randomText(theme=PYTHON, sentences=1)+' (%d)' % len(story), bt))
 
-
 	doc = MyDocTemplate('test_platypus_breaking.pdf')
 	doc.multiBuild(story)
 
+
 class BreakingTestCase(unittest.TestCase):
 	"Test multi-page splitting of paragraphs (eyeball-test)."
-	def test1(self):
-		_test1(self)
+	def test0(self):
+		_test0(self)
+
 
 def makeSuite():
-	suite = unittest.TestSuite()
-	suite.addTest(BreakingTestCase('test1'))
-	return suite
+    return makeSuiteForClasses(BreakingTestCase)
 
+
+#noruntests
 if __name__ == "__main__": #NORUNTESTS
 	if 'debug' in sys.argv:
-		_test1(None)
+		_test0(None)
 	else:
 		unittest.TextTestRunner().run(makeSuite())
--- a/reportlab/test/test_platypus_general.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_platypus_general.py	Thu Jul 04 09:24:49 2002 +0000
@@ -1,8 +1,8 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/platypus/test/testplatypus.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/test/test_platypus_general.py,v 1.8 2002/06/20 09:55:29 rgbecker Exp $
-__version__=''' $Id: test_platypus_general.py,v 1.8 2002/06/20 09:55:29 rgbecker Exp $ '''
+#$Header: /tmp/reportlab/reportlab/test/test_platypus_general.py,v 1.9 2002/07/04 09:24:49 dinu_gherman Exp $
+__version__=''' $Id: test_platypus_general.py,v 1.9 2002/07/04 09:24:49 dinu_gherman Exp $ '''
 
 #tests and documents Page Layout API
 __doc__="""This is not obvious so here's a brief explanation.  This module is both
@@ -13,7 +13,12 @@
 builds a special "document model" in which the frames are added to each page
 and drawn into.
 """
+
 import string, copy, sys
+
+from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
+
 from reportlab.pdfgen import canvas
 from reportlab import platypus
 from reportlab.platypus import BaseDocTemplate, PageTemplate, Flowable, FrameBreak
@@ -22,7 +27,6 @@
 from reportlab.lib.styles import PropertySet, getSampleStyleSheet, ParagraphStyle
 from reportlab.lib import colors
 from reportlab.rl_config import defaultPageSize
-from reportlab.test import unittest
 
 PAGE_HEIGHT = defaultPageSize[1]
 
@@ -468,8 +472,12 @@
             self.fillFrame(flowables2)
 
         self._endBuild()
+
+
 def showProgress(pageNo):
     print 'CALLBACK SAYS: page %d' % pageNo
+
+
 def run():
     doc = AndyTemplate('test_platypus_general.pdf')
     #doc.setPageCallBack(showProgress)
@@ -477,16 +485,17 @@
     examples = getExamples()
     doc.build(commentary,examples)
 
+
 class PlatypusTestCase(unittest.TestCase):
     "Make documents with lots of Platypus features"
-    def test1(self):
+
+    def test0(self):
         "Make a platypus document"
         run()
 
+
 def makeSuite():
-    suite = unittest.TestSuite()
-    suite.addTest(PlatypusTestCase('test1'))
-    return suite
+    return makeSuiteForClasses(PlatypusTestCase)
 
 
 #noruntests
@@ -494,4 +503,4 @@
     if '-debug' in sys.argv:
         run()
     else:
-        unittest.TextTestRunner().run(makeSuite())
+        unittest.TextTestRunner().run(makeSuite)
--- a/reportlab/test/test_platypus_paragraphs.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_platypus_paragraphs.py	Thu Jul 04 09:24:49 2002 +0000
@@ -1,17 +1,18 @@
 #copyright ReportLab Inc. 2000-2001
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/test/test_platypus_paragraphs.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/test/test_platypus_paragraphs.py,v 1.7 2001/11/26 21:49:01 andy_robinson Exp $
+#$Header: /tmp/reportlab/reportlab/test/test_platypus_paragraphs.py,v 1.8 2002/07/04 09:24:49 dinu_gherman Exp $
 """Tests for the reportlab.platypus.paragraphs module.
 """
 
 import sys, os, tempfile
-
 from string import split, strip, join, whitespace
 from operator import truth
 from types import StringType, ListType
 
 from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
+
 from reportlab.pdfbase.pdfmetrics import stringWidth
 from reportlab.platypus.paraparser import ParaParser
 from reportlab.platypus.flowables import Flowable
@@ -58,7 +59,7 @@
 class ParagraphSplitTestCase(unittest.TestCase):
     "Test multi-page splitting of paragraphs (eyeball-test)."
     
-    def test1(self):
+    def test0(self):
         "This makes one long multi-page paragraph."
 
         # Build story.
@@ -77,7 +78,7 @@
 class FragmentTestCase(unittest.TestCase):
     "Test fragmentation of paragraphs."
     
-    def test1(self):
+    def test0(self):
         "Test empty paragraph."
 
         styleSheet = getSampleStyleSheet()
@@ -88,7 +89,7 @@
         assert frags == []
 
 
-    def test2(self):
+    def test1(self):
         "Test simple paragraph."
 
         styleSheet = getSampleStyleSheet()
@@ -99,16 +100,13 @@
         assert frags == ['X', 'Y', 'Z']
 
 
+#noruntests
 def makeSuite():
-    suite = unittest.TestSuite()
-    
-    suite.addTest(FragmentTestCase('test1'))
-    suite.addTest(FragmentTestCase('test2'))
-    suite.addTest(ParagraphSplitTestCase('test1'))
-
-    return suite
+    return makeSuiteForClasses(FragmentTestCase, ParagraphSplitTestCase)
 
 
 #noruntests
 if __name__ == "__main__":
     unittest.TextTestRunner().run(makeSuite())
+
+
--- a/reportlab/test/test_platypus_tables.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_platypus_tables.py	Thu Jul 04 09:24:49 2002 +0000
@@ -2,14 +2,17 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/platypus/test/testtables.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/test/test_platypus_tables.py,v 1.1 2001/04/13 16:02:55 andy_robinson Exp $
-__version__=''' $Id: test_platypus_tables.py,v 1.1 2001/04/13 16:02:55 andy_robinson Exp $ '''
+#$Header: /tmp/reportlab/reportlab/test/test_platypus_tables.py,v 1.2 2002/07/04 09:24:49 dinu_gherman Exp $
+__version__=''' $Id: test_platypus_tables.py,v 1.2 2002/07/04 09:24:49 dinu_gherman Exp $ '''
 __doc__='Test script for reportlab.tables'
 
+from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
+
 from reportlab.platypus import Spacer, SimpleDocTemplate, Table, TableStyle
 from reportlab.lib.units import inch
 from reportlab.lib import colors
-from reportlab.test import unittest
+
 
 def getTable():
     t = Table((('','North','South','East','West'),
@@ -21,6 +24,7 @@
             )
     return t
 
+
 def makeStyles():
     styles = []
     for i in range(5):
@@ -35,6 +39,7 @@
     styles[-1].add('LINEBELOW',(1,-1), (-1, -1), 2, (0.5, 0.5, 0.5))
     return styles
 
+
 def run():
     doc = SimpleDocTemplate('test_platypus_tables.pdf', pagesize=(8.5*inch, 11*inch), showBoundary=1)
     styles = makeStyles()
@@ -50,22 +55,24 @@
         lst.append(Spacer(0,12))
     doc.build(lst)
 
+
 class TablesTestCase(unittest.TestCase):
     "Make documents with tables"
-    def test1(self):
+
+    def test0(self):
         "Make a document full of tables"
         run()
 
+
 def makeSuite():
-    suite = unittest.TestSuite()
-    suite.addTest(TablesTestCase('test1'))
-    return suite
+    return makeSuiteForClasses(TablesTestCase)
 
 
 #noruntests
 if __name__ == "__main__":
     unittest.TextTestRunner().run(makeSuite())
 
+
 #LINEABOVE
 #LINEBELOW
 #LINEBEFORE
--- a/reportlab/test/test_platypus_toc.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_platypus_toc.py	Thu Jul 04 09:24:49 2002 +0000
@@ -1,7 +1,7 @@
 #copyright ReportLab Inc. 2000-2001
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/test/test_platypus_toc.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/test/test_platypus_toc.py,v 1.7 2001/11/26 21:49:01 andy_robinson Exp $
+#$Header: /tmp/reportlab/reportlab/test/test_platypus_toc.py,v 1.8 2002/07/04 09:24:49 dinu_gherman Exp $
 """Tests for the Platypus TableOfContents class.
 
 Currently there is only one such test. Most such tests, like this
@@ -15,6 +15,8 @@
 from math import sqrt
 
 from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
+
 from reportlab.lib.units import inch, cm
 from reportlab.lib.pagesizes import A4
 from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
@@ -28,6 +30,7 @@
 from reportlab.platypus.tables import TableStyle, Table
 from reportlab.lib import randomtext
 
+
 def myMainPageFrame(canvas, doc):
     "The page frame used for all PDF documents."
     
@@ -89,10 +92,12 @@
 
     return style
 
+
 def makeBodyStyle():
     "Body text style - the default will do"
     return ParagraphStyle('body')
 
+
 def makeTocHeaderStyle(level, delta, epsilon, fontName='Times-Roman'):
     "Make a header style for different levels."
 
@@ -115,7 +120,7 @@
 class TocTestCase(unittest.TestCase):
     "Test TableOfContents class (eyeball-test)."
     
-    def test1(self):
+    def test0(self):
         """Test story with TOC and a cascaded header hierarchy.
 
         The story should contain exactly one table of contents that is
@@ -149,7 +154,7 @@
         styleSheet = getSampleStyleSheet()
         bt = styleSheet['BodyText']
 
-        description = '<font color=red>%s</font>' % self.test1.__doc__
+        description = '<font color=red>%s</font>' % self.test0.__doc__
         story.append(XPreformatted(description, bt))
 
         toc = TableOfContents()
@@ -171,9 +176,7 @@
         
 
 def makeSuite():
-    suite = unittest.TestSuite()
-    suite.addTest(TocTestCase('test1'))
-    return suite
+    return makeSuiteForClasses(TocTestCase)
 
 
 #noruntests
--- a/reportlab/test/test_platypus_xref.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_platypus_xref.py	Thu Jul 04 09:24:49 2002 +0000
@@ -1,17 +1,18 @@
 #copyright ReportLab Inc. 2000-2001
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/test/test_platypus_paragraphs.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/test/test_platypus_xref.py,v 1.1 2001/11/27 02:49:26 andy_robinson Exp $
+#$Header: /tmp/reportlab/reportlab/test/test_platypus_xref.py,v 1.2 2002/07/04 09:24:49 dinu_gherman Exp $
 """Test long documents with indexes, tables and cross-references
 """
 
 import sys, os, time
-
 from string import split, strip, join, whitespace, find
 from operator import truth
 from types import StringType, ListType
 
 from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
+
 from reportlab.lib import colors
 from reportlab.lib.units import cm
 from reportlab.lib.enums import TA_LEFT, TA_RIGHT, TA_CENTER, TA_JUSTIFY
@@ -21,6 +22,7 @@
 from reportlab.lib.randomtext import randomText, PYTHON
 from reportlab.platypus.tableofcontents import TableOfContents, SimpleIndex
 
+
 def myMainPageFrame(canvas, doc):
     "The page frame used for all PDF documents."
 
@@ -70,8 +72,9 @@
                     #print 'IndexEntry:',phrase, self.page
             
 
-def _test1(self):
+def _test0(self):
     "This makes one long multi-page paragraph."
+
     # Build story.
     story = []
 
@@ -88,7 +91,6 @@
 
     bt = styleSheet['BodyText']
 
-    
     story.append(Paragraph("""Cross-Referencing Test""", styleSheet["Title"]))
     story.append(Paragraph("""
         Subsequent pages test cross-references: indexes, tables and individual
@@ -116,21 +118,22 @@
     story.append(Paragraph('The Index which goes at the back', h1))
     story.append(SimpleIndex())
 
-
     doc = MyDocTemplate('test_platypus_xref.pdf')
     doc.multiBuild(story)
 
+
 class BreakingTestCase(unittest.TestCase):
     "Test multi-page splitting of paragraphs (eyeball-test)."
-    def test1(self):
-        _test1(self)
+    def test0(self):
+        _test0(self)
+
 
 def makeSuite():
-    suite = unittest.TestSuite()
-    suite.addTest(BreakingTestCase('test1'))
-    return suite
+    return makeSuiteForClasses(BreakingTestCase)
+
 
-if __name__ == "__main__": #NORUNTESTS
+#noruntests
+if __name__ == "__main__":
     if 'debug' in sys.argv:
         _test1(None)
     else:
--- a/reportlab/test/test_pyfiles.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_pyfiles.py	Thu Jul 04 09:24:49 2002 +0000
@@ -1,15 +1,17 @@
 #copyright ReportLab Inc. 2000-2001
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/test/test_pyfiles.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/test/test_pyfiles.py,v 1.8 2002/05/24 14:38:09 dinu_gherman Exp $
+#$Header: /tmp/reportlab/reportlab/test/test_pyfiles.py,v 1.9 2002/07/04 09:24:49 dinu_gherman Exp $
 """Tests performed on all Python source files of the ReportLab distribution.
 """
 
 
 import os, sys, string, fnmatch, re
 
+from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
+
 import reportlab
-from reportlab.test import unittest
 from reportlab.test.utils import SecureTestCase, GlobDirectoryWalker
 
 
@@ -181,17 +183,14 @@
 
 
 def makeSuite():
-    suite = unittest.TestSuite()    
-
-    suite.addTest(SelfTestCase('testUnique'))
-    suite.addTest(AsciiFileTestCase('testAscii'))
-    suite.addTest(FilenameTestCase('testTrailingDigits'))
+    suite = makeSuiteForClasses(SelfTestCase, AsciiFileTestCase, FilenameTestCase)
     if sys.platform[:4] != 'java':
-        suite.addTest(FirstLineTestCase('test1'))
-
+        loader = unittest.TestLoader()
+        suite.addTest(loader.loadTestsFromTestCase(FirstLineTestCase))
     return suite
 
 
 #noruntests
 if __name__ == "__main__":
     unittest.TextTestRunner().run(makeSuite())
+
--- a/reportlab/test/test_renderSVG.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_renderSVG.py	Thu Jul 04 09:24:49 2002 +0000
@@ -1,9 +1,11 @@
 #!/usr/bin/env python
 
 import string
-import unittest
 from xml.dom import minidom
 
+from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
+
 from reportlab.graphics.shapes import *
 from reportlab.graphics import renderSVG
 
@@ -104,21 +106,10 @@
         renderSVG.drawToFile(d, path)
 
 
+def makeSuite():
+    return makeSuiteForClasses(RenderSvgSimpleTestCase, RenderSvgAxesTestCase)
 
 
-def makeSuite():
-    suite = unittest.TestSuite()
-
-    suite.addTest(RenderSvgSimpleTestCase('test0'))
-    suite.addTest(RenderSvgSimpleTestCase('test1'))
-    suite.addTest(RenderSvgSimpleTestCase('test2'))
-
-    suite.addTest(RenderSvgAxesTestCase('test0'))
-
-    return suite
-
-
-
-
+#noruntests
 if __name__ == "__main__":
     unittest.TextTestRunner().run(makeSuite())
--- a/reportlab/test/test_tools_pythonpoint.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_tools_pythonpoint.py	Thu Jul 04 09:24:49 2002 +0000
@@ -1,14 +1,20 @@
 """Tests for the PythonPoint tool.
 """
+
 import os, sys, string
+
+from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
+
 import reportlab
-from reportlab.test import unittest
+
 
 class PythonPointTestCase(unittest.TestCase):
 	"Some very crude tests on PythonPoint."
 
-	def test1(self):
+	def test0(self):
 		"Test if pythonpoint.pdf can be created from pythonpoint.xml."
+
 		join, dirname, isfile, abspath = os.path.join, os.path.dirname, os.path.isfile, os.path.abspath
 		rlDir = abspath(dirname(reportlab.__file__))
 		from reportlab.tools.pythonpoint import pythonpoint
@@ -21,10 +27,11 @@
 		assert os.path.exists(pdf)
 		os.remove(pdf)
 
+
 def makeSuite():
-	suite = unittest.TestSuite()
-	suite.addTest(PythonPointTestCase('test1'))
-	return suite
+    return makeSuiteForClasses(PythonPointTestCase)
+
 
-if __name__ == "__main__":	#NORUNTESTS
-	unittest.TextTestRunner().run(makeSuite())
+#noruntests
+if __name__ == "__main__":
+    unittest.TextTestRunner().run(makeSuite())
--- a/reportlab/test/test_widgetbase_tpc.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_widgetbase_tpc.py	Thu Jul 04 09:24:49 2002 +0000
@@ -1,7 +1,7 @@
 #copyright ReportLab Inc. 2000-2001
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/test/test_widgetbase_tpc.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/test/test_widgetbase_tpc.py,v 1.1 2001/06/07 15:27:03 rgbecker Exp $
+#$Header: /tmp/reportlab/reportlab/test/test_widgetbase_tpc.py,v 1.2 2002/07/04 09:24:49 dinu_gherman Exp $
 """
 Tests for TypedPropertyCollection class.
 """
@@ -9,10 +9,12 @@
 import os, sys, copy, tempfile
 from os.path import join, basename, splitext
 
+from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
+
 from reportlab.graphics.widgetbase import PropHolder, TypedPropertyCollection
 from reportlab.lib.attrmap import AttrMap, AttrMapValue
 from reportlab.lib.validators import isNumber
-from reportlab.test import unittest
 
 
 TPC = TypedPropertyCollection
@@ -24,10 +26,12 @@
 		b = AttrMapValue(isNumber)
 		)
 
+
 class APH(PH):
 	def __init__(self):
 		self.a = 1
 
+
 class BPH(APH):
 	def __init__(self):
 		APH.__init__(self)
@@ -36,10 +40,11 @@
 		if name=='b': return -1
 		raise AttributeError
 
+
 class TPCTestCase(unittest.TestCase):
 	"Test TypedPropertyCollection class."
 
-	def test1(self):
+	def test0(self):
 		"Test setting an invalid collective attribute."
 
 		t = TPC(PH)
@@ -49,7 +54,7 @@
 			pass
 		
 
-	def test2(self):
+	def test1(self):
 		"Test setting a valid collective attribute."
 
 		t = TPC(PH)
@@ -57,7 +62,7 @@
 		assert t.a == 42
 
 
-	def test3(self):
+	def test2(self):
 		"Test setting a valid collective attribute with an invalid value."
 
 		t = TPC(PH)
@@ -67,7 +72,7 @@
 			pass
 
 
-	def test4(self):
+	def test3(self):
 		"Test setting a valid collective attribute with a convertible invalid value."
 
 		t = TPC(PH)
@@ -75,7 +80,7 @@
 		assert t.a == '42' # Or should it rather be an integer?
 		
 
-	def test5(self):
+	def test4(self):
 		"Test accessing an unset collective attribute."
 
 		t = TPC(PH)
@@ -85,7 +90,7 @@
 			pass
 
 
-	def test6(self):
+	def test5(self):
 		"Test overwriting a collective attribute in one slot."
 
 		t = TPC(PH)
@@ -94,7 +99,7 @@
 		assert t[0].a == 4242
 
 
-	def test7(self):
+	def test6(self):
 		"Test overwriting a one slot attribute with a collective one."
 
 		t = TPC(PH)
@@ -102,7 +107,8 @@
 		t.a = 42
 		assert t[0].a == 4242
 
-	def test8(self):
+
+	def test7(self):
 		"Test to ensure we can handle classes with __getattr__ methods"
 
 		a=TypedPropertyCollection(APH)
@@ -124,20 +130,9 @@
 
 
 def makeSuite():
-	suite = unittest.TestSuite()
-
-	suite.addTest(TPCTestCase('test1'))
-	suite.addTest(TPCTestCase('test2'))
-	suite.addTest(TPCTestCase('test3'))
-	suite.addTest(TPCTestCase('test4'))
-	suite.addTest(TPCTestCase('test5'))
-	suite.addTest(TPCTestCase('test6'))
-	suite.addTest(TPCTestCase('test7'))
-	suite.addTest(TPCTestCase('test8'))
-
-	return suite
+    return makeSuiteForClasses(TPCTestCase)
 
 
 #noruntests
 if __name__ == "__main__":
-	unittest.TextTestRunner().run(makeSuite())
+    unittest.TextTestRunner().run(makeSuite())
--- a/reportlab/test/test_widgets_grids.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/test_widgets_grids.py	Thu Jul 04 09:24:49 2002 +0000
@@ -1,5 +1,6 @@
 
-import unittest
+from reportlab.test import unittest
+from reportlab.test.utils import makeSuiteForClasses
 
 from reportlab.lib import colors
 from reportlab.graphics.shapes import Drawing, Group, Line, Rect
@@ -443,17 +444,10 @@
         renderSVG.drawToFile(d, 'test_widgets_grids2.svg')
 
 
+def makeSuite():
+    return makeSuiteForClasses(GridTestCase)
 
 
-def makeSuite():
-    suite = unittest.TestSuite()
-
-    suite.addTest(GridTestCase('test0'))
-    suite.addTest(GridTestCase('test1'))
-    suite.addTest(GridTestCase('test2'))
-
-    return suite
-
-
+#noruntests
 if __name__ == "__main__":
     unittest.TextTestRunner().run(makeSuite())
--- a/reportlab/test/utils.py	Wed Jul 03 10:22:29 2002 +0000
+++ b/reportlab/test/utils.py	Thu Jul 04 09:24:49 2002 +0000
@@ -10,6 +10,17 @@
 
 # Helper functions.
 
+def makeSuiteForClasses(*classes):
+    "Return a test suite with tests loaded from provided classes."
+
+    suite = unittest.TestSuite()
+    loader = unittest.TestLoader()
+    for C in classes:
+        suite.addTest(loader.loadTestsFromTestCase(C))
+
+    return suite
+
+
 def getCVSEntries(folder, files=1, folders=0):
     """Returns a list of filenames as listed in the CVS/Entries file.
 
@@ -190,6 +201,7 @@
         sys.path = self._initialPath
         os.chdir(self._initialWorkDir)
 
+
 class ScriptThatMakesFileTest(unittest.TestCase):
     """Runs a Python script at OS level, expecting it to produce a file.