Mercurial > hg
comparison tests/test-module-imports.t @ 26956:4b56214ebb7a
import-checker: include lineno in warning message
This makes it easy to look for imports in function scope.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 01 Nov 2015 15:46:06 +0900 |
parents | 2cc4e8385661 |
children | 5abba2c92da3 |
comparison
equal
deleted
inserted
replaced
26955:c4114e335b49 | 26956:4b56214ebb7a |
---|---|
85 > from __future__ import absolute_import | 85 > from __future__ import absolute_import |
86 > from testpackage.unsorted import foo | 86 > from testpackage.unsorted import foo |
87 > EOF | 87 > EOF |
88 | 88 |
89 $ python "$import_checker" testpackage/*.py testpackage/subpackage/*.py | 89 $ python "$import_checker" testpackage/*.py testpackage/subpackage/*.py |
90 testpackage/importalias.py ui module must be "as" aliased to uimod | 90 testpackage/importalias.py:2: ui module must be "as" aliased to uimod |
91 testpackage/importfromalias.py ui from testpackage must be "as" aliased to uimod | 91 testpackage/importfromalias.py:2: ui from testpackage must be "as" aliased to uimod |
92 testpackage/importfromrelative.py import should be relative: testpackage.unsorted | 92 testpackage/importfromrelative.py:2: import should be relative: testpackage.unsorted |
93 testpackage/importfromrelative.py direct symbol import from testpackage.unsorted | 93 testpackage/importfromrelative.py:2: direct symbol import from testpackage.unsorted |
94 testpackage/latesymbolimport.py symbol import follows non-symbol import: mercurial.node | 94 testpackage/latesymbolimport.py:3: symbol import follows non-symbol import: mercurial.node |
95 testpackage/multiple.py multiple imported names: os, sys | 95 testpackage/multiple.py:2: multiple imported names: os, sys |
96 testpackage/multiplegroups.py multiple "from . import" statements | 96 testpackage/multiplegroups.py:3: multiple "from . import" statements |
97 testpackage/relativestdlib.py relative import of stdlib module | 97 testpackage/relativestdlib.py:2: relative import of stdlib module |
98 testpackage/requirerelative.py import should be relative: testpackage.unsorted | 98 testpackage/requirerelative.py:2: import should be relative: testpackage.unsorted |
99 testpackage/sortedentries.py imports from testpackage not lexically sorted: bar < foo | 99 testpackage/sortedentries.py:2: imports from testpackage not lexically sorted: bar < foo |
100 testpackage/stdafterlocal.py stdlib import follows local import: os | 100 testpackage/stdafterlocal.py:3: stdlib import follows local import: os |
101 testpackage/subpackage/levelpriority.py higher-level import should come first: testpackage | 101 testpackage/subpackage/levelpriority.py:3: higher-level import should come first: testpackage |
102 testpackage/symbolimport.py direct symbol import from testpackage.unsorted | 102 testpackage/symbolimport.py:2: direct symbol import from testpackage.unsorted |
103 testpackage/unsorted.py imports not lexically sorted: os < sys | 103 testpackage/unsorted.py:3: imports not lexically sorted: os < sys |
104 [1] | 104 [1] |
105 | 105 |
106 $ cd "$TESTDIR"/.. | 106 $ cd "$TESTDIR"/.. |
107 | 107 |
108 There are a handful of cases here that require renaming a module so it | 108 There are a handful of cases here that require renaming a module so it |