[PATCH STABLE] runtests: add the repo root to the python path

Pierre-Yves David pierre-yves.david at ens-lyon.org
Fri Apr 29 12:38:20 EDT 2016



On 04/29/2016 05:11 PM, Durham Goode wrote:
> On Apr 29, 2016 3:25 AM, Pierre-Yves David <pierre-yves.david at ens-lyon.org> wrote:
>> It seems like this would make the content of the repo override the
>> result of the install in all case. This feel wrong as testing the actual
>> install is usually very important.
> pythondir is the installdir when an install happens in run-tests, and it comes first in the Python path, so it should always take precedence.

But it won't catch failures to install some component which is a common 
problem.

>
>> We should probably have a clean distinction and mechanism for
>> install/local in run-tests.py. In the mean time, one can hack around
>> $TESTDIR to work around.
> What do you mean hack around $TESTDIR?  I'm writing a Python unit test (not a .t test), so I can't just do extensions.foo=$TESTDIR/../foo .

Cf Augie email. You have access to both sys.path and environment 
variable and can play around as much as needed.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list