I noticed an issue testing the installed pyoxidizer binary using --with-hg
where it would pass more tests than if the tests are run with --pyoxidized.
It turns out that _usecorrectpython() augments PATH to include the python
binary and its Scripts directory on Windows, and I happen to have pip
installed Mercurial in that version of python. Therefore, the which() method
picked up this installed executable, and wrote that to the generated hg script
in the custom bin directory.
There's an issue here when running test-run-tests.t with --local, as noted
in the comments. I suspect that some stuff from the main instance of
run-tests.py is bleeding into the *.t file's instances of run-tests.py
because when I print opts.with_hg at the point where is complains that
"--with-hg must specify an executable hg script", the path is in the form
"C:\\\\Users\\\\Matt\\\\...". (Two of those slashes are escapes the test runner
puts into printed lines.) If I hardcode r"C:\Users\Matt\..." in run-tests.py,
then it works fine.
/s/used/use/