def run_tests(verbose): # do NOT import those at the top level, coverage will be inaccurate if # distutils2 modules are imported before coverage magic is started from distutils2.tests import test_suite from distutils2._backport.tests import test_suite as btest_suite try: try: run_unittest([test_suite(), btest_suite()], verbose=verbose) return 0 except TestFailed: return 1 finally: reap_children()
def test_main(): run_unittest(distutils2.tests.test_suite()) run_unittest(btest_suite()) reap_children()