test-extension: do not depend on demandimport (
issue5012)
When demandimport is disabled, the test will fail because extroot/foo.py uses
import outside PYTHONPATH. This is bad since we have a PyPy migration plan and
it does not support demandimport. Fix by setting PYTHONPATH.
--- a/tests/test-extension.t Tue Dec 22 06:03:00 2015 +0000
+++ b/tests/test-extension.t Fri Dec 18 09:47:21 2015 +0000
@@ -206,7 +206,7 @@
> from extroot.bar import s
> buf.append('from extroot.bar import s: %s' % s)
> EOF
- $ hg --config extensions.extroot=$TESTTMP/extroot root
+ $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.extroot=$TESTTMP/extroot root)
(extroot) from extroot.bar import *: this is extroot.bar
(extroot) import extroot.sub1.baz: this is extroot.sub1.baz
(extroot) import extroot: this is extroot.__init__