[PATCH 3 of 7] tests: bulk change to avoid "unneeded trailing ', ' ..." error of check-code.py

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Sun Feb 17 12:19:26 EST 2019


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1550417245 -32400
#      Mon Feb 18 00:27:25 2019 +0900
# Node ID d294202804a296c3f03e1c013886c5c1f174be6c
# Parent  308243c661d7fb232997d290dfd861b95e36f090
# Available At https://bitbucket.org/foozy/mercurial-wip
#              hg pull https://bitbucket.org/foozy/mercurial-wip -r d294202804a2
# EXP-Topic tests-fix-check-code-errors
tests: bulk change to avoid "unneeded trailing ',' ..." error of check-code.py

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

"trailing ','" at the end of command option list in the code fragment
of test-bundle2-format.t is still left as it is, in order to follow
the style of command definitions in Mercurial core.

diff --git a/tests/test-bundle2-format.t b/tests/test-bundle2-format.t
--- a/tests/test-bundle2-format.t
+++ b/tests/test-bundle2-format.t
@@ -82,7 +82,8 @@ Create an extension to test bundle2 API
   >           (b'', b'genraise', False, b'includes a part that raise an exception during generation'),
   >           (b'', b'timeout', False, b'emulate a timeout during bundle generation'),
   >           (b'r', b'rev', [], b'includes those changeset in the bundle'),
-  >           (b'', b'compress', b'', b'compress the stream'),],
+  >           (b'', b'compress', b'', b'compress the stream'),
+  >          ],
   >          b'[OUTPUTFILE]')
   > def cmdbundle2(ui, repo, path=None, **opts):
   >     """write a bundle2 container on standard output"""
diff --git a/tests/test-clone.t b/tests/test-clone.t
--- a/tests/test-clone.t
+++ b/tests/test-clone.t
@@ -569,7 +569,7 @@ iterable in addbranchrevs()
   > extensions.loadall(myui)
   > extensions.populateui(myui)
   > repo = hg.repository(myui, b'a')
-  > hg.clone(myui, {}, repo, dest=b"ua", branch=[b"stable",])
+  > hg.clone(myui, {}, repo, dest=b"ua", branch=[b"stable"])
   > EOF
 
   $ "$PYTHON" branchclone.py


More information about the Mercurial-devel mailing list