"""Make tests/ into a package. This allows us to "import tests" andhave tests.all_tests be a TestSuite representing all test casesfrom all test_*.py files in tests/."""# Author: Collin Winterimportosimportos.pathimportunittestimporttypesfrom.importsupportall_tests=unittest.TestSuite()tests_dir=os.path.join(os.path.dirname(__file__),'..','tests')tests=[t[0:-3]fortinos.listdir(tests_dir)ift.startswith('test_')andt.endswith('.py')]loader=unittest.TestLoader()fortintests:__import__("",globals(),locals(),[t],level=1)mod=globals()[t]all_tests.addTests(loader.loadTestsFromModule(mod))