test-extension: do not depend on demandimport (issue5012)
authorJun Wu <quark@fb.com>
Fri, 18 Dec 2015 09:47:21 +0000
changeset 27491 28c1aa12f5de
parent 27490 fe376159a58d
child 27492 ac549d7fbc2b
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.
tests/test-extension.t
--- 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__