--- a/tests/test-imports-checker.t Thu Aug 31 11:28:59 2017 -0700
+++ b/tests/test-imports-checker.t Mon Aug 28 13:43:25 2017 -0700
@@ -125,7 +125,19 @@
> from mercurial.node import hex
> EOF
- $ $PYTHON "$import_checker" testpackage*/*.py testpackage/subpackage/*.py
+# Shadowing a stdlib module to test "relative import of stdlib module" is
+# allowed if the module is also being checked
+
+ $ mkdir email
+ $ touch email/__init__.py
+ $ touch email/errors.py
+ $ cat > email/utils.py << EOF
+ > from __future__ import absolute_import
+ > from . import errors
+ > EOF
+
+ $ $PYTHON "$import_checker" testpackage*/*.py testpackage/subpackage/*.py \
+ > email/*.py
testpackage/importalias.py:2: ui module must be "as" aliased to uimod
testpackage/importfromalias.py:2: ui from testpackage must be "as" aliased to uimod
testpackage/importfromrelative.py:2: import should be relative: testpackage.unsorted