31
31
Automatically loads all the tests in the GTG/tests directory and returns a
32
32
unittest.TestSuite filled with them
35
35
test_dir = os.path.dirname(__file__)
36
36
test_files = filter(lambda f: f.endswith(".py") and f.startswith("test_"),
41
40
test_suite = unittest.TestSuite()
42
41
for module_name in [f[:-3] for f in test_files]:
44
43
module_path = TEST_MODULE_PREFIX + module_name
45
44
module = __import__(module_path)
46
45
sys.modules[module_path] = module
47
46
globals()[module_path] = module
50
49
# Crude hack to satisfy both GIT repository and GTG trunk
51
50
if TEST_MODULE_PREFIX == "GTG.tests.":