Fix pep8 test
Change-Id: If571457351240f84ec130a8e1550bf07e1f0507f
This commit is contained in:
parent
53a6e7054e
commit
bba715c507
@ -29,10 +29,7 @@ class BlockExecuteTestCase(base.IronicLibTestCase):
|
|||||||
subprocess.check_output, utils.execute)
|
subprocess.check_output, utils.execute)
|
||||||
|
|
||||||
for function_name in execute_functions:
|
for function_name in execute_functions:
|
||||||
exc = self.assertRaises(
|
exc = self.assertRaises(Exception, function_name, ["echo", "%s" % function_name]) # noqa
|
||||||
Exception,
|
|
||||||
function_name,
|
|
||||||
["echo", "%s" % function_name]) # noqa
|
|
||||||
# Have to use 'noqa' as we are raising plain Exception and we will
|
# Have to use 'noqa' as we are raising plain Exception and we will
|
||||||
# get H202 error in 'pep8' check.
|
# get H202 error in 'pep8' check.
|
||||||
|
|
||||||
@ -58,10 +55,7 @@ class BlockExecuteTestCase(base.IronicLibTestCase):
|
|||||||
# still get an exception for a child. So in this case
|
# still get an exception for a child. So in this case
|
||||||
# ironic_lib.utils.execute() calls processutils.execute(). Make sure an
|
# ironic_lib.utils.execute() calls processutils.execute(). Make sure an
|
||||||
# exception is raised even though we mocked processutils.execute()
|
# exception is raised even though we mocked processutils.execute()
|
||||||
exc = self.assertRaises(
|
exc = self.assertRaises(Exception, utils.execute, "ls") # noqa
|
||||||
Exception,
|
|
||||||
utils.execute,
|
|
||||||
"ls") # noqa
|
|
||||||
# Have to use 'noqa' as we are raising plain Exception and we will get
|
# Have to use 'noqa' as we are raising plain Exception and we will get
|
||||||
# H202 error in 'pep8' check.
|
# H202 error in 'pep8' check.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user