summaryrefslogtreecommitdiffstats
path: root/src/sbin/bcfg2-test
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-03-11 08:01:39 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-03-11 08:01:39 -0400
commit439e72b36f66855cfb66de111147a4b92e80da19 (patch)
treec5fcafeab2800446793e4600976e21cd05a4669b /src/sbin/bcfg2-test
parentaaa2d3230082eb283c34e308250da1381d181365 (diff)
downloadbcfg2-439e72b36f66855cfb66de111147a4b92e80da19.tar.gz
bcfg2-439e72b36f66855cfb66de111147a4b92e80da19.tar.bz2
bcfg2-439e72b36f66855cfb66de111147a4b92e80da19.zip
added PEP-8 style checks to test suite
Diffstat (limited to 'src/sbin/bcfg2-test')
-rwxr-xr-xsrc/sbin/bcfg2-test12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/sbin/bcfg2-test b/src/sbin/bcfg2-test
index 3dcad8689..4a57fa42f 100755
--- a/src/sbin/bcfg2-test
+++ b/src/sbin/bcfg2-test
@@ -5,7 +5,6 @@ without failures"""
import os
import sys
-import signal
import fnmatch
import logging
import Bcfg2.Logger
@@ -26,7 +25,7 @@ except ImportError:
class CapturingLogger(object):
""" Fake logger that captures logging output so that errors are
only displayed for clients that fail tests """
- def __init__(self, *args, **kwargs):
+ def __init__(self, *args, **kwargs): # pylint: disable=W0613
self.output = []
def error(self, msg):
@@ -46,6 +45,7 @@ class CapturingLogger(object):
self.output.append(msg)
def reset_output(self):
+ """ Reset the captured output """
self.output = []
@@ -182,7 +182,8 @@ def run_child(setup, clients, queue):
core.shutdown()
-def main():
+def parse_args():
+ """ Parse command line arguments. """
optinfo = dict(Bcfg2.Options.TEST_COMMON_OPTIONS)
optinfo.update(Bcfg2.Options.CLI_COMMON_OPTIONS)
optinfo.update(Bcfg2.Options.SERVER_COMMON_OPTIONS)
@@ -230,7 +231,12 @@ def main():
pass
if xunitfile and not setup['xunit']:
setup['xunit'] = xunitfile
+ return setup
+
+def main():
+ setup = parse_args()
+ logger = logging.getLogger(sys.argv[0])
core = get_core(setup)
if setup['args']: