Patchwork [5,of,7] tests: bulk changes to avoid "omit superfluous pass" check-code.py error

login
register
mail settings
Submitter Katsunori FUJIWARA
Date Feb. 17, 2019, 5:19 p.m.
Message ID <617e8b6f8721d3f9ba35.1550423968@footprints>
Download mbox | patch
Permalink /patch/38805/
State Accepted
Headers show

Comments

Katsunori FUJIWARA - Feb. 17, 2019, 5:19 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1550417245 -32400
#      Mon Feb 18 00:27:25 2019 +0900
# Node ID 617e8b6f8721d3f9ba351c614a47dfd287505704
# Parent  c1c8ae482985411a899cced234c2ef07d508c356
# Available At https://bitbucket.org/foozy/mercurial-wip
#              hg pull https://bitbucket.org/foozy/mercurial-wip -r 617e8b6f8721
# EXP-Topic tests-fix-check-code-errors
tests: bulk changes to avoid "omit superfluous pass" check-code.py error

This is a part of preparation to apply checking with check-code.py on
code fragments embedded in *.t test scripts.

Patch

diff --git a/tests/test-extension.t b/tests/test-extension.t
--- a/tests/test-extension.t
+++ b/tests/test-extension.t
@@ -688,13 +688,11 @@  hide outer repo
   > @command(b'debugfoobar', [], b'hg debugfoobar')
   > def debugfoobar(ui, repo, *args, **opts):
   >     "yet another debug command"
-  >     pass
   > @command(b'foo', [], b'hg foo')
   > def foo(ui, repo, *args, **opts):
   >     """yet another foo command
   >     This command has been DEPRECATED since forever.
   >     """
-  >     pass
   > EOF
   $ debugpath=`pwd`/debugextension.py
   $ echo "debugextension = $debugpath" >> $HGRCPATH
@@ -964,7 +962,6 @@  Test help topic with same name as extens
   > @command(b'multirevs', [], b'ARG', norepo=True)
   > def multirevs(ui, repo, arg, *args, **opts):
   >     """multirevs command"""
-  >     pass
   > EOF
   $ echo "multirevs = multirevs.py" >> $HGRCPATH
 
diff --git a/tests/test-help.t b/tests/test-help.t
--- a/tests/test-help.t
+++ b/tests/test-help.t
@@ -825,7 +825,6 @@  this is a section and erroring out weird
   > @command(b'hashelp', [], b'hg hashelp', norepo=True)
   > def hashelp(ui, *args, **kwargs):
   >     """Extension command's help"""
-  >     pass
   > 
   > def uisetup(ui):
   >     ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext')