patman: Fix whitespace errors in func_test

Fix up various indentation and other minor things to make pylint3 happier.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2020-10-29 21:46:13 -06:00
parent e21c515817
commit 427b028aeb

View file

@ -24,20 +24,20 @@ from patman.test_util import capture_sys_output
try:
import pygit2
HAVE_PYGIT2= True
HAVE_PYGIT2 = True
except ModuleNotFoundError:
HAVE_PYGIT2 = False
@contextlib.contextmanager
def capture():
oldout,olderr = sys.stdout, sys.stderr
oldout, olderr = sys.stdout, sys.stderr
try:
out=[StringIO(), StringIO()]
sys.stdout,sys.stderr = out
out = [StringIO(), StringIO()]
sys.stdout, sys.stderr = out
yield out
finally:
sys.stdout,sys.stderr = oldout, olderr
sys.stdout, sys.stderr = oldout, olderr
out[0] = out[0].getvalue()
out[1] = out[1].getvalue()
@ -177,9 +177,9 @@ class TestFunctional(unittest.TestCase):
cc_file = series.MakeCcFile(process_tags, cover_fname,
not ignore_bad_tags, add_maintainers,
None)
cmd = gitutil.EmailPatches(series, cover_fname, args,
dry_run, not ignore_bad_tags, cc_file,
in_reply_to=in_reply_to, thread=None)
cmd = gitutil.EmailPatches(
series, cover_fname, args, dry_run, not ignore_bad_tags,
cc_file, in_reply_to=in_reply_to, thread=None)
series.ShowActions(args, cmd, process_tags)
cc_lines = open(cc_file, encoding='utf-8').read().splitlines()
os.remove(cc_file)
@ -221,8 +221,9 @@ class TestFunctional(unittest.TestCase):
self.assertEqual(('%s %s\0%s' % (args[0], rick, stefan)),
tools.ToUnicode(cc_lines[0]))
self.assertEqual(('%s %s\0%s\0%s\0%s' % (args[1], fred, ed, rick,
stefan)), tools.ToUnicode(cc_lines[1]))
self.assertEqual(
'%s %s\0%s\0%s\0%s' % (args[1], fred, ed, rick, stefan),
tools.ToUnicode(cc_lines[1]))
expected = '''
This is a test of how the cover