[PATCH 3 of 3] py3: allow run-tests.py to run on Windows

Matt Harbison mharbison72 at gmail.com
Tue Sep 18 21:51:04 EDT 2018


On Tue, 18 Sep 2018 09:40:58 -0400, Yuya Nishihara <yuya at tcha.org> wrote:

>> It looks like part of the problem with not finding these files is  
>> TESTDIR
>> is not defined when running the *.t file.  Inside Test.runTest(),
>> 'TESTDIR' is not in env, osenvironb, or os.environ on py3 (but it is on
>> py2).  I'm assuming this is a bytes vs unicode thing since Linux works,
>> but I can't tell where it is being set in the first place.  The one  
>> place
>> it is set around run-tests.py:2511 is skipped on both py2 and py3 when a
>> relative *.t is given.  A few other variables are missing too, like
>> PYTHON.  The HG* variables from _getenv() are defined.
>
> Perhaps, the real os.environ wouldn't be updated on Windows since  
> environb
> is a copy. We'll have to ditch implicit updates of the environ/environb.
> Another option is to write an environb-like wrapper over os.environ.

You're right.  I forgot the b'' when fetching from osenvironb, so it  
didn't look set there either.


More information about the Mercurial-devel mailing list