diff --git a/.testr.conf b/.testr.conf new file mode 100644 index 0000000..35d9ba4 --- /dev/null +++ b/.testr.conf @@ -0,0 +1,7 @@ +[DEFAULT] +test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ + OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ + OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \ + ${PYTHON:-python} -m subunit.run discover -t ./ ./tests $LISTOPT $IDOPTION +test_id_option=--load-list $IDFILE +test_list_option=--list diff --git a/cathead/cathead.py b/cathead/cathead.py index 5c226c0..652ebba 100644 --- a/cathead/cathead.py +++ b/cathead/cathead.py @@ -113,12 +113,14 @@ class Cathead(object): def wait(self): self._scheduler.wait() + def main(): if len(sys.argv) == 2: # sys.path.append(os.path.abspath(sys.argv[1])) # conf_module = importlib.import_module(sys.argv[1].split(".py")[0]) # conf = __import__(sys.argv[1].split(".py")[0]) - (file, path, desc) = imp.find_module(sys.argv[1].split(".py")[0], ["."]) + py_file = sys.argv[1].split(".py")[0] + (file, path, desc) = imp.find_module(py_file, ["."]) conf_module = imp.load_module('', file, path, desc) Cathead(conf_module.CONF).start() else: diff --git a/tests/test_selfsigndriver.py b/tests/test_selfsigndriver.py index d82d539..cc02c1c 100644 --- a/tests/test_selfsigndriver.py +++ b/tests/test_selfsigndriver.py @@ -1,6 +1,6 @@ import re -import unittest import tempfile +import unittest from cathead.drivers import selfsign from cathead import x509