Fix pep8 and py27 checks for gate

Change-Id: I6d0abb66a4e39aaef762a2b31c2522991078e06c
This commit is contained in:
Tom Cammann 2015-09-01 20:52:05 +01:00
parent 9f47702df2
commit fd022a4257
3 changed files with 11 additions and 2 deletions

7
.testr.conf Normal file
View File

@ -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

View File

@ -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:

View File

@ -1,6 +1,6 @@
import re
import unittest
import tempfile
import unittest
from cathead.drivers import selfsign
from cathead import x509