Patchwork [1,of,5] tests: import multiple modules separately

login
register
mail settings
Submitter Katsunori FUJIWARA
Date Oct. 8, 2018, 5:34 p.m.
Message ID <fe5486e76d2610bdd208.1539020076@blacknile>
Download mbox | patch
Permalink /patch/35549/
State Accepted
Headers show

Comments

Katsunori FUJIWARA - Oct. 8, 2018, 5:34 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1534994441 -32400
#      Thu Aug 23 12:20:41 2018 +0900
# Node ID fe5486e76d2610bdd20837b487deb3f0a9a2d820
# Parent  1d09ba0d2ed3d19f1ca1b116591cc413eb87ac65
# Available At https://bitbucket.org/foozy/mercurial-wip
#              hg pull https://bitbucket.org/foozy/mercurial-wip -r fe5486e76d26
# EXP-Topic contrib-improve-import-checker
tests: import multiple modules separately

Current import-checker.py overlooks code fragment changed in this
patch, because of restrictions below for a line starting code
fragment.

  - filename must be specified before limit mark

    NG: cat <<EOF > FILE.py
    OK: cat > FILE.py <<EOF

  - limit mark must not be quoted

    NG: cat > FILE.py <<'EOF'
    OK: cat > FILE.py <<EOF

import-checker.py itself is fixed in subsequent patch.
Yuya Nishihara - Oct. 9, 2018, 11:57 a.m.
On Tue, 09 Oct 2018 02:34:36 +0900, FUJIWARA Katsunori wrote:
> # HG changeset patch
> # User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
> # Date 1534994441 -32400
> #      Thu Aug 23 12:20:41 2018 +0900
> # Node ID fe5486e76d2610bdd20837b487deb3f0a9a2d820
> # Parent  1d09ba0d2ed3d19f1ca1b116591cc413eb87ac65
> # Available At https://bitbucket.org/foozy/mercurial-wip
> #              hg pull https://bitbucket.org/foozy/mercurial-wip -r fe5486e76d26
> # EXP-Topic contrib-improve-import-checker
> tests: import multiple modules separately

Queued, thanks.

> diff --git a/tests/test-check-help.t b/tests/test-check-help.t
> --- a/tests/test-check-help.t
> +++ b/tests/test-check-help.t
> @@ -7,7 +7,8 @@
>    > import re
>    > import sys
>    > if sys.platform == "win32":
> -  >     import os, msvcrt
> +  >     import os
> +  >     import msvcrt

Sorted them lexicographically.

Patch

diff --git a/tests/test-check-help.t b/tests/test-check-help.t
--- a/tests/test-check-help.t
+++ b/tests/test-check-help.t
@@ -7,7 +7,8 @@ 
   > import re
   > import sys
   > if sys.platform == "win32":
-  >     import os, msvcrt
+  >     import os
+  >     import msvcrt
   >     msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
   > topics = set()
   > topicre = re.compile(br':hg:`help ([a-z0-9\-.]+)`')