From bba715c5074780b762091563b5ce951377844a8e Mon Sep 17 00:00:00 2001 From: Riccardo Pittau Date: Tue, 12 May 2020 11:35:34 +0200 Subject: [PATCH] Fix pep8 test Change-Id: If571457351240f84ec130a8e1550bf07e1f0507f --- ironic_lib/tests/test_base.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ironic_lib/tests/test_base.py b/ironic_lib/tests/test_base.py index 77f64288..14196561 100644 --- a/ironic_lib/tests/test_base.py +++ b/ironic_lib/tests/test_base.py @@ -29,10 +29,7 @@ class BlockExecuteTestCase(base.IronicLibTestCase): subprocess.check_output, utils.execute) for function_name in execute_functions: - exc = self.assertRaises( - Exception, - function_name, - ["echo", "%s" % function_name]) # noqa + exc = self.assertRaises(Exception, function_name, ["echo", "%s" % function_name]) # noqa # Have to use 'noqa' as we are raising plain Exception and we will # 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 # ironic_lib.utils.execute() calls processutils.execute(). Make sure an # exception is raised even though we mocked processutils.execute() - exc = self.assertRaises( - Exception, - utils.execute, - "ls") # noqa + exc = self.assertRaises(Exception, utils.execute, "ls") # noqa # Have to use 'noqa' as we are raising plain Exception and we will get # H202 error in 'pep8' check.