annotate tests/test-imports-checker.t @ 51460:cebd96dee99a

branchcache: move the filename to a class attribute This prepare the introduction of more variant of cache.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 25 Feb 2024 20:40:37 +0100
parents 42d2b31cee0b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23894
f388ceae2250 test-module-imports: use test-repo requirement
Matt Mackall <mpm@selenic.com>
parents: 22947
diff changeset
1 #require test-repo
f388ceae2250 test-module-imports: use test-repo requirement
Matt Mackall <mpm@selenic.com>
parents: 22947
diff changeset
2
29219
3c9066ed557c tests: silence test-repo obsolete warning
timeless <timeless@mozdev.org>
parents: 29212
diff changeset
3 $ . "$TESTDIR/helpers-testrepo.sh"
33204
ddd65b4f3ae6 tests: alias syshg and syshgenv so they can be switched conditionally
Yuya Nishihara <yuya@tcha.org>
parents: 33116
diff changeset
4 $ testrepohgenv
20039
05626e87489c test-module-imports.t: new test to use the import cycle detector
Augie Fackler <raf@durin42.com>
parents:
diff changeset
5 $ import_checker="$TESTDIR"/../contrib/import-checker.py
23894
f388ceae2250 test-module-imports: use test-repo requirement
Matt Mackall <mpm@selenic.com>
parents: 22947
diff changeset
6
20039
05626e87489c test-module-imports.t: new test to use the import cycle detector
Augie Fackler <raf@durin42.com>
parents:
diff changeset
7 Run the doctests from the import checker, and make sure
05626e87489c test-module-imports.t: new test to use the import cycle detector
Augie Fackler <raf@durin42.com>
parents:
diff changeset
8 it's working correctly.
05626e87489c test-module-imports.t: new test to use the import cycle detector
Augie Fackler <raf@durin42.com>
parents:
diff changeset
9 $ TERM=dumb
05626e87489c test-module-imports.t: new test to use the import cycle detector
Augie Fackler <raf@durin42.com>
parents:
diff changeset
10 $ export TERM
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 34038
diff changeset
11 $ "$PYTHON" -m doctest $import_checker
20039
05626e87489c test-module-imports.t: new test to use the import cycle detector
Augie Fackler <raf@durin42.com>
parents:
diff changeset
12
25703
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
13 Run additional tests for the import checker
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
14
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
15 $ mkdir testpackage
29206
0ec8501af800 import-checker: fix test to make a real package
Yuya Nishihara <yuya@tcha.org>
parents: 28923
diff changeset
16 $ touch testpackage/__init__.py
25703
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
17
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
18 $ cat > testpackage/multiple.py << EOF
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
19 > import os, sys
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
20 > EOF
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
21
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
22 $ cat > testpackage/unsorted.py << EOF
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
23 > import sys
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
24 > import os
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
25 > EOF
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
26
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
27 $ cat > testpackage/stdafterlocal.py << EOF
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
28 > from . import unsorted
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
29 > import os
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
30 > EOF
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
31
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
32 $ cat > testpackage/requirerelative.py << EOF
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
33 > import testpackage.unsorted
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
34 > EOF
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
35
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
36 $ cat > testpackage/importalias.py << EOF
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
37 > import ui
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
38 > EOF
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
39
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
40 $ cat > testpackage/relativestdlib.py << EOF
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
41 > from .. import os
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
42 > EOF
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
43
43954
303576116ac1 import-checker: allow all absolute imports of stdlib modules
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
44 $ cat > testpackage/stdlibfrom.py << EOF
303576116ac1 import-checker: allow all absolute imports of stdlib modules
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
45 > from collections import abc
303576116ac1 import-checker: allow all absolute imports of stdlib modules
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
46 > EOF
303576116ac1 import-checker: allow all absolute imports of stdlib modules
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
47
25703
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
48 $ cat > testpackage/symbolimport.py << EOF
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
49 > from .unsorted import foo
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
50 > EOF
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
51
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
52 $ cat > testpackage/latesymbolimport.py << EOF
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
53 > from . import unsorted
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
54 > from mercurial.node import hex
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
55 > EOF
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
56
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
57 $ cat > testpackage/multiplegroups.py << EOF
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
58 > from . import unsorted
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
59 > from . import more
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
60 > EOF
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
61
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
62 $ mkdir testpackage/subpackage
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
63 $ cat > testpackage/subpackage/levelpriority.py << EOF
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
64 > from . import foo
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
65 > from .. import parent
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
66 > EOF
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
67
26964
5abba2c92da3 import-checker: allow import of child modules from package root
Yuya Nishihara <yuya@tcha.org>
parents: 26956
diff changeset
68 $ touch testpackage/subpackage/foo.py
5abba2c92da3 import-checker: allow import of child modules from package root
Yuya Nishihara <yuya@tcha.org>
parents: 26956
diff changeset
69 $ cat > testpackage/subpackage/__init__.py << EOF
5abba2c92da3 import-checker: allow import of child modules from package root
Yuya Nishihara <yuya@tcha.org>
parents: 26956
diff changeset
70 > from . import levelpriority # should not cause cycle
5abba2c92da3 import-checker: allow import of child modules from package root
Yuya Nishihara <yuya@tcha.org>
parents: 26956
diff changeset
71 > EOF
5abba2c92da3 import-checker: allow import of child modules from package root
Yuya Nishihara <yuya@tcha.org>
parents: 26956
diff changeset
72
26965
1fa66d3ad28d import-checker: reset context to verify convention in function scope
Yuya Nishihara <yuya@tcha.org>
parents: 26964
diff changeset
73 $ cat > testpackage/subpackage/localimport.py << EOF
1fa66d3ad28d import-checker: reset context to verify convention in function scope
Yuya Nishihara <yuya@tcha.org>
parents: 26964
diff changeset
74 > from . import foo
1fa66d3ad28d import-checker: reset context to verify convention in function scope
Yuya Nishihara <yuya@tcha.org>
parents: 26964
diff changeset
75 > def bar():
1fa66d3ad28d import-checker: reset context to verify convention in function scope
Yuya Nishihara <yuya@tcha.org>
parents: 26964
diff changeset
76 > # should not cause "higher-level import should come first"
1fa66d3ad28d import-checker: reset context to verify convention in function scope
Yuya Nishihara <yuya@tcha.org>
parents: 26964
diff changeset
77 > from .. import unsorted
1fa66d3ad28d import-checker: reset context to verify convention in function scope
Yuya Nishihara <yuya@tcha.org>
parents: 26964
diff changeset
78 > # but other errors should be detected
1fa66d3ad28d import-checker: reset context to verify convention in function scope
Yuya Nishihara <yuya@tcha.org>
parents: 26964
diff changeset
79 > from .. import more
1fa66d3ad28d import-checker: reset context to verify convention in function scope
Yuya Nishihara <yuya@tcha.org>
parents: 26964
diff changeset
80 > import testpackage.subpackage.levelpriority
1fa66d3ad28d import-checker: reset context to verify convention in function scope
Yuya Nishihara <yuya@tcha.org>
parents: 26964
diff changeset
81 > EOF
1fa66d3ad28d import-checker: reset context to verify convention in function scope
Yuya Nishihara <yuya@tcha.org>
parents: 26964
diff changeset
82
27272
69308357ecd1 import-checker: allow absolute imports of sub modules from local packages
Yuya Nishihara <yuya@tcha.org>
parents: 26965
diff changeset
83 $ cat > testpackage/importmodulefromsub.py << EOF
69308357ecd1 import-checker: allow absolute imports of sub modules from local packages
Yuya Nishihara <yuya@tcha.org>
parents: 26965
diff changeset
84 > from .subpackage import foo # not a "direct symbol import"
69308357ecd1 import-checker: allow absolute imports of sub modules from local packages
Yuya Nishihara <yuya@tcha.org>
parents: 26965
diff changeset
85 > EOF
69308357ecd1 import-checker: allow absolute imports of sub modules from local packages
Yuya Nishihara <yuya@tcha.org>
parents: 26965
diff changeset
86
69308357ecd1 import-checker: allow absolute imports of sub modules from local packages
Yuya Nishihara <yuya@tcha.org>
parents: 26965
diff changeset
87 $ cat > testpackage/importsymbolfromsub.py << EOF
69308357ecd1 import-checker: allow absolute imports of sub modules from local packages
Yuya Nishihara <yuya@tcha.org>
parents: 26965
diff changeset
88 > from .subpackage import foo, nonmodule
69308357ecd1 import-checker: allow absolute imports of sub modules from local packages
Yuya Nishihara <yuya@tcha.org>
parents: 26965
diff changeset
89 > EOF
69308357ecd1 import-checker: allow absolute imports of sub modules from local packages
Yuya Nishihara <yuya@tcha.org>
parents: 26965
diff changeset
90
25703
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
91 $ cat > testpackage/sortedentries.py << EOF
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
92 > from . import (
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
93 > foo,
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
94 > bar,
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
95 > )
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
96 > EOF
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
97
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
98 $ cat > testpackage/importfromalias.py << EOF
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
99 > from . import ui
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
100 > EOF
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
101
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
102 $ cat > testpackage/importfromrelative.py << EOF
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
103 > from testpackage.unsorted import foo
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
104 > EOF
1a6a117d0b95 import-checker: establish modern import convention
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25498
diff changeset
105
29208
cba8bc11ed10 import-checker: extend check of symbol-import order to all local modules
Yuya Nishihara <yuya@tcha.org>
parents: 29206
diff changeset
106 $ mkdir testpackage2
cba8bc11ed10 import-checker: extend check of symbol-import order to all local modules
Yuya Nishihara <yuya@tcha.org>
parents: 29206
diff changeset
107 $ touch testpackage2/__init__.py
cba8bc11ed10 import-checker: extend check of symbol-import order to all local modules
Yuya Nishihara <yuya@tcha.org>
parents: 29206
diff changeset
108
cba8bc11ed10 import-checker: extend check of symbol-import order to all local modules
Yuya Nishihara <yuya@tcha.org>
parents: 29206
diff changeset
109 $ cat > testpackage2/latesymbolimport.py << EOF
cba8bc11ed10 import-checker: extend check of symbol-import order to all local modules
Yuya Nishihara <yuya@tcha.org>
parents: 29206
diff changeset
110 > from testpackage import unsorted
cba8bc11ed10 import-checker: extend check of symbol-import order to all local modules
Yuya Nishihara <yuya@tcha.org>
parents: 29206
diff changeset
111 > from mercurial.node import hex
cba8bc11ed10 import-checker: extend check of symbol-import order to all local modules
Yuya Nishihara <yuya@tcha.org>
parents: 29206
diff changeset
112 > EOF
cba8bc11ed10 import-checker: extend check of symbol-import order to all local modules
Yuya Nishihara <yuya@tcha.org>
parents: 29206
diff changeset
113
34038
bc2535238de2 import-checker: allow relative import a module being checked
Jun Wu <quark@fb.com>
parents: 33262
diff changeset
114 # Shadowing a stdlib module to test "relative import of stdlib module" is
bc2535238de2 import-checker: allow relative import a module being checked
Jun Wu <quark@fb.com>
parents: 33262
diff changeset
115 # allowed if the module is also being checked
bc2535238de2 import-checker: allow relative import a module being checked
Jun Wu <quark@fb.com>
parents: 33262
diff changeset
116
bc2535238de2 import-checker: allow relative import a module being checked
Jun Wu <quark@fb.com>
parents: 33262
diff changeset
117 $ mkdir email
bc2535238de2 import-checker: allow relative import a module being checked
Jun Wu <quark@fb.com>
parents: 33262
diff changeset
118 $ touch email/__init__.py
bc2535238de2 import-checker: allow relative import a module being checked
Jun Wu <quark@fb.com>
parents: 33262
diff changeset
119 $ touch email/errors.py
bc2535238de2 import-checker: allow relative import a module being checked
Jun Wu <quark@fb.com>
parents: 33262
diff changeset
120 $ cat > email/utils.py << EOF
bc2535238de2 import-checker: allow relative import a module being checked
Jun Wu <quark@fb.com>
parents: 33262
diff changeset
121 > from . import errors
bc2535238de2 import-checker: allow relative import a module being checked
Jun Wu <quark@fb.com>
parents: 33262
diff changeset
122 > EOF
bc2535238de2 import-checker: allow relative import a module being checked
Jun Wu <quark@fb.com>
parents: 33262
diff changeset
123
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 34038
diff changeset
124 $ "$PYTHON" "$import_checker" testpackage*/*.py testpackage/subpackage/*.py \
34038
bc2535238de2 import-checker: allow relative import a module being checked
Jun Wu <quark@fb.com>
parents: 33262
diff changeset
125 > email/*.py
48876
42d2b31cee0b tests: remove from __future__ from inline Python in tests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43954
diff changeset
126 testpackage/importalias.py:1: ui module must be "as" aliased to uimod
42d2b31cee0b tests: remove from __future__ from inline Python in tests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43954
diff changeset
127 testpackage/importfromalias.py:1: ui from testpackage must be "as" aliased to uimod
42d2b31cee0b tests: remove from __future__ from inline Python in tests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43954
diff changeset
128 testpackage/importfromrelative.py:1: import should be relative: testpackage.unsorted
42d2b31cee0b tests: remove from __future__ from inline Python in tests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43954
diff changeset
129 testpackage/importfromrelative.py:1: direct symbol import foo from testpackage.unsorted
42d2b31cee0b tests: remove from __future__ from inline Python in tests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43954
diff changeset
130 testpackage/importsymbolfromsub.py:1: direct symbol import nonmodule from testpackage.subpackage
42d2b31cee0b tests: remove from __future__ from inline Python in tests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43954
diff changeset
131 testpackage/latesymbolimport.py:2: symbol import follows non-symbol import: mercurial.node
42d2b31cee0b tests: remove from __future__ from inline Python in tests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43954
diff changeset
132 testpackage/multiple.py:1: multiple imported names: os, sys
42d2b31cee0b tests: remove from __future__ from inline Python in tests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43954
diff changeset
133 testpackage/multiplegroups.py:2: multiple "from . import" statements
42d2b31cee0b tests: remove from __future__ from inline Python in tests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43954
diff changeset
134 testpackage/relativestdlib.py:1: relative import of stdlib module
42d2b31cee0b tests: remove from __future__ from inline Python in tests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43954
diff changeset
135 testpackage/requirerelative.py:1: import should be relative: testpackage.unsorted
42d2b31cee0b tests: remove from __future__ from inline Python in tests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43954
diff changeset
136 testpackage/sortedentries.py:1: imports from testpackage not lexically sorted: bar < foo
42d2b31cee0b tests: remove from __future__ from inline Python in tests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43954
diff changeset
137 testpackage/stdafterlocal.py:2: stdlib import "os" follows local import: testpackage
42d2b31cee0b tests: remove from __future__ from inline Python in tests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43954
diff changeset
138 testpackage/stdlibfrom.py:1: direct symbol import abc from collections
42d2b31cee0b tests: remove from __future__ from inline Python in tests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43954
diff changeset
139 testpackage/subpackage/levelpriority.py:2: higher-level import should come first: testpackage
42d2b31cee0b tests: remove from __future__ from inline Python in tests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43954
diff changeset
140 testpackage/subpackage/localimport.py:6: multiple "from .. import" statements
42d2b31cee0b tests: remove from __future__ from inline Python in tests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43954
diff changeset
141 testpackage/subpackage/localimport.py:7: import should be relative: testpackage.subpackage.levelpriority
42d2b31cee0b tests: remove from __future__ from inline Python in tests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43954
diff changeset
142 testpackage/symbolimport.py:1: direct symbol import foo from testpackage.unsorted
42d2b31cee0b tests: remove from __future__ from inline Python in tests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43954
diff changeset
143 testpackage/unsorted.py:2: imports not lexically sorted: os < sys
42d2b31cee0b tests: remove from __future__ from inline Python in tests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43954
diff changeset
144 testpackage2/latesymbolimport.py:2: symbol import follows non-symbol import: mercurial.node
25731
cd1daab5d036 import-checker.py: exit with code 0 if no error is detected
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25703
diff changeset
145 [1]