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

Yuya Nishihara yuya at tcha.org
Tue Sep 18 09:40:58 EDT 2018


> 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.


More information about the Mercurial-devel mailing list