[Dev] Unit test runner

Phillip J. Eby pje at telecommunity.com
Wed Jan 26 14:58:12 PST 2005


At 04:03 PM 1/26/05 -0500, Phillip J. Eby wrote:
>     def test_suite():
>         return TestSuite(
>             [defaultTestLoader.loadTestsFromName(name, repository.tests)
>                 for name in testNames]
>         )

Oops; I made a mistake in the above; it only works when the test modules 
have already been imported by Python.  It should read:

     def test_suite():
         return TestSuite(
             [defaultTestLoader.loadTestsFromName("repository.tests."+name)
                 for name in testNames]
         )

in order to work even if the individual test modules aren't in memory yet.



More information about the Dev mailing list