PyXR

c:\python24\lib \ distutils \ tests \ __init__.py



0001 """Test suite for distutils.
0002 
0003 This test suite consists of a collection of test modules in the
0004 distutils.tests package.  Each test module has a name starting with
0005 'test' and contains a function test_suite().  The function is expected
0006 to return an initialized unittest.TestSuite instance.
0007 
0008 Tests for the command classes in the distutils.command package are
0009 included in distutils.tests as well, instead of using a separate
0010 distutils.command.tests package, since command identification is done
0011 by import rather than matching pre-defined names.
0012 
0013 """
0014 
0015 import os
0016 import sys
0017 import unittest
0018 
0019 
0020 here = os.path.dirname(__file__)
0021 
0022 
0023 def test_suite():
0024     suite = unittest.TestSuite()
0025     for fn in os.listdir(here):
0026         if fn.startswith("test") and fn.endswith(".py"):
0027             modname = "distutils.tests." + fn[:-3]
0028             __import__(modname)
0029             module = sys.modules[modname]
0030             suite.addTest(module.test_suite())
0031     return suite
0032 
0033 
0034 if __name__ == "__main__":
0035     unittest.main(defaultTest="test_suite")
0036 

Generated by PyXR 0.9.4
SourceForge.net Logo