load test suites

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
remotes/origin/feature_files_export
Nico Schottelius 13 years ago
parent 9aa064a0ae
commit 97da16f4bc
  1. 10
      lib/cdist/test/__main__.py

@ -33,17 +33,19 @@ for possible_test in os.listdir(base_dir):
filename = "__init__.py"
mod_path = os.path.join(base_dir, possible_test, filename)
print(mod_path + "x")
if os.path.isfile(mod_path):
test_modules.append(possible_test)
print(sys.path)
suites = []
for test_module in test_modules:
module = imp.find_module(test_module, [base_dir])
imp.load_module(test_module, *module)
#suite = unittest.defaultTestLoader.loadTestsFromModule(cdist.test.code)
print(module)
# module_name =
suite = unittest.defaultTestLoader.loadTestsFromModule("cdist.test." + test_module)
suites.append(suite)

Loading…
Cancel
Save