Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: 73b4a7a7943026b90b3d04932ffb1efd0d6b107e authored by Larry Hastings on 10 August 2015, 04:37:20 UTC
Merged fixes for two bad bugs. This will be the new Python 3.5.0rc1.
Tip revision: 73b4a7a
__init__.py
import os
import sys
import unittest


here = os.path.dirname(__file__)
loader = unittest.defaultTestLoader

def suite():
    suite = unittest.TestSuite()
    for fn in os.listdir(here):
        if fn.startswith("test") and fn.endswith(".py"):
            modname = "unittest.test." + fn[:-3]
            __import__(modname)
            module = sys.modules[modname]
            suite.addTest(loader.loadTestsFromModule(module))
    suite.addTest(loader.loadTestsFromName('unittest.test.testmock'))
    return suite


if __name__ == "__main__":
    unittest.main(defaultTest="suite")
back to top