# HG changeset patch # User Patrick Mezard # Date 1392474512 -3600 # Node ID c559280de767e2b7ec2ec247c542b2741a4a6351 # Parent fd5aa85ac2b9d34f3252b818f8b7c162f45543ee run-tests: fix heredoctest for out-of-tree extensions heredoctest.py directory must be in python path to use heredoctest (>>>) in out-of-tree extension tests like: $ cd ext/tests $ python /some/hg/install/tests/run-tests.py test-ext.t [ original upstream message ] diff -r fd5aa85ac2b9 -r c559280de767 tests/run-tests.py --- a/tests/run-tests.py Thu Feb 13 08:29:44 2014 +0100 +++ b/tests/run-tests.py Sat Feb 15 15:28:32 2014 +0100 @@ -1264,8 +1264,9 @@ # Include TESTDIR in PYTHONPATH so that out-of-tree extensions # can run .../tests/run-tests.py test-foo where test-foo - # adds an extension to HGRC - pypath = [PYTHONDIR, TESTDIR] + # adds an extension to HGRC. Also include run-test.py directory to import + # modules like heredoctest. + pypath = [PYTHONDIR, TESTDIR, os.path.abspath(os.path.dirname(__file__))] # We have to augment PYTHONPATH, rather than simply replacing # it, in case external libraries are only available via current # PYTHONPATH. (In particular, the Subversion bindings on OS X