@@ -216,10 +216,11 @@ class TestFunctional(unittest.TestCase):
os.remove(cc_file)
lines = iter(out[0].getvalue().splitlines())
- self.assertIn('1 warnings for', next(lines))
+ self.assertIn('1 warning for', next(lines))
self.assertEqual(
- "\t Tag 'Commit-notes' should be before sign-off / Change-Id",
+ "\tTag 'Commit-notes' should be before sign-off / Change-Id",
next(lines))
+ self.assertEqual('', next(lines))
self.assertEqual('Cleaned %s patches' % len(series.commits),
next(lines))
self.assertEqual('Change log missing for v2', next(lines))
@@ -687,12 +687,13 @@ def fix_patches(series, fnames):
cmt.count = count
result = fix_patch(backup_dir, fname, series, cmt)
if result:
- print('%d warnings for %s:' % (len(result), fname))
+ print('%d warning%s for %s:' %
+ (len(result), 's' if len(result) > 1 else '', fname))
for warn in result:
- print('\t', warn)
- print
+ print('\t%s' % warn)
+ print()
count += 1
- print('Cleaned %d patches' % count)
+ print('Cleaned %d patche%s' % (count, 's' if count > 1 else ''))
def insert_cover_letter(fname, series, count):
"""Inserts a cover letter with the required info into patch 0
Tidy up the extra 's' when there is only a single warning. Fix the empty print statement also. Signed-off-by: Simon Glass <sjg@chromium.org> --- (no changes since v1) tools/patman/func_test.py | 5 +++-- tools/patman/patchstream.py | 9 +++++---- 2 files changed, 8 insertions(+), 6 deletions(-)