diff --git a/tests/test-extension.t b/tests/test-extension.t --- a/tests/test-extension.t +++ b/tests/test-extension.t @@ -574,25 +574,35 @@ > NO_CHECK_EOF Examine module importing. - - $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.absextroot=$TESTTMP/absextroot showabsolute) - LIB: this is extlibroot.lsub1.lsub2.used - LIB: this is extlibroot.lsub1.lsub2.called.func() - LIB: this is extlibroot.recursedown.abs.used - LIB: this is extlibroot.recursedown.legacy.used - LIB: this is extlibroot.shadowing.used - ABS: this is absextroot.xsub1.xsub2.used - ABS: this is absextroot.xsub1.xsub2.called.func() +Python 3.5's lazy module importer varies in behavior from ours and the +one in the standard library at 3.6+. This is not desirable. But it is +a corner case in behavior and we don't expect many people to be running +into it. - $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.absextroot=$TESTTMP/absextroot showrelative) - LIB: this is extlibroot.lsub1.lsub2.used - LIB: this is extlibroot.lsub1.lsub2.called.func() - LIB: this is extlibroot.recursedown.abs.used - LIB: this is extlibroot.recursedown.legacy.used - LIB: this is extlibroot.shadowing.used - REL: this is absextroot.xsub1.xsub2.used - REL: this is absextroot.xsub1.xsub2.called.func() - REL: this relimporter imports 'this is absextroot.relimportee' + $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.absextroot=$TESTTMP/absextroot showabsolute) || true + LIB: this is extlibroot.lsub1.lsub2.used (no-pyexact35 !) + LIB: this is extlibroot.lsub1.lsub2.called.func() (no-pyexact35 !) + LIB: this is extlibroot.recursedown.abs.used (no-pyexact35 !) + LIB: this is extlibroot.recursedown.legacy.used (no-pyexact35 !) + LIB: this is extlibroot.shadowing.used (no-pyexact35 !) + ABS: this is absextroot.xsub1.xsub2.used (no-pyexact35 !) + ABS: this is absextroot.xsub1.xsub2.called.func() (no-pyexact35 !) + *** failed to import extension absextroot from $TESTTMP/absextroot: extlibroot.lsub1.lsub2.unused is loaded unintentionally (pyexact35 !) + hg: unknown command 'showabsolute' (pyexact35 !) + (use 'hg help' for a list of commands) (pyexact35 !) + + $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.absextroot=$TESTTMP/absextroot showrelative) || true + LIB: this is extlibroot.lsub1.lsub2.used (no-pyexact35 !) + LIB: this is extlibroot.lsub1.lsub2.called.func() (no-pyexact35 !) + LIB: this is extlibroot.recursedown.abs.used (no-pyexact35 !) + LIB: this is extlibroot.recursedown.legacy.used (no-pyexact35 !) + LIB: this is extlibroot.shadowing.used (no-pyexact35 !) + REL: this is absextroot.xsub1.xsub2.used (no-pyexact35 !) + REL: this is absextroot.xsub1.xsub2.called.func() (no-pyexact35 !) + REL: this relimporter imports 'this is absextroot.relimportee' (no-pyexact35 !) + *** failed to import extension absextroot from $TESTTMP/absextroot: extlibroot.lsub1.lsub2.unused is loaded unintentionally (pyexact35 !) + hg: unknown command 'showrelative' (pyexact35 !) + (did you mean shelve?) (pyexact35 !) Examine whether sub-module is imported relatively as expected.