Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

tests: Fix stylistic problems pointed by pylint

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
  • Loading branch information...
commit 33f0a4675cfe9a29511ab226249803fef3447001 1 parent 87b76d6
@lmr lmr authored
View
4 tests/module_probe.py
@@ -30,7 +30,7 @@ def run_module_probe(test, params, env):
for _ in range(load_count):
try:
installer_object.load_modules()
- except Exception,e:
+ except Exception, e:
raise error.TestFail("Failed to load modules [%r]: %s" %
(installer_object.module_list, e))
@@ -39,7 +39,7 @@ def run_module_probe(test, params, env):
# and we want to run the loop as fast as possible.
for mod in reversed(installer_object.module_list):
r = utils.system("rmmod %s" % (mod), ignore_status=True)
- if r <> 0:
+ if r != 0:
raise error.TestFail("Failed to unload module %s. "
"exit status: %d" % (mod, r))
finally:
View
4 tests/netperf.py
@@ -216,8 +216,8 @@ def ssh_cmd(ip, cmd, user="root"):
def launch_client(sessions, server, server_ctl, host, client, l, nf_args, port):
""" Launch netperf clients """
- client_path="/tmp/netperf-2.4.5/src/netperf"
- server_path="/tmp/netperf-2.4.5/src/netserver"
+ client_path = "/tmp/netperf-2.4.5/src/netperf"
+ server_path = "/tmp/netperf-2.4.5/src/netserver"
ssh_cmd(server_ctl, "pidof netserver || %s -p %s" % (server_path, port))
ncpu = ssh_cmd(server_ctl, "cat /proc/cpuinfo |grep processor |wc -l")
View
2  tests/ntttcp.py
@@ -136,7 +136,7 @@ def sender():
def parse_file(resultfile):
""" Parse raw result files and generate files with standard format """
fileobj = open(resultfile, "r")
- lst= []
+ lst = []
found = False
for line in fileobj.readlines():
o = re.findall("Send buffer size: (\d+)", line)
View
6 tests/save_restore.py
@@ -18,7 +18,7 @@ def run_save_restore(test, params, env):
@param env: Dictionary with test environment.
"""
- def get_save_filename(path="",file_pfx=""):
+ def get_save_filename(path="", file_pfx=""):
"""
Generate a guaranteed not to clash filename.
@@ -28,7 +28,7 @@ def get_save_filename(path="",file_pfx=""):
"""
if not path:
path = tempfile.gettempdir()
- fd,filename = tempfile.mkstemp(prefix = file_pfx, dir=path)
+ fd, filename = tempfile.mkstemp(prefix=file_pfx, dir=path)
os.close(fd)
return filename
@@ -91,7 +91,7 @@ def check_system(vm, timeout):
while True:
try:
vm.verify_kernel_crash()
- check_system(vm,120) # networking needs time to recover
+ check_system(vm, 120) # networking needs time to recover
logging.info("Save/restores left: %d (or %0.4f more seconds)" %
(repeat, (time_to_stop - time.time())))
if start_delay:
View
2  tests/unattended_install.py
@@ -85,7 +85,7 @@ def __init__(self, path, ip, port, filename):
self.port = port
self.filename = filename
- start_unattended_server_thread(self.port,self.path)
+ start_unattended_server_thread(self.port, self.path)
def get_url(self):
Please sign in to comment.
Something went wrong with that request. Please try again.