diff -r ba8aa20ff31f -r fa5a0c2b9f04 tests/run-tests.py --- a/tests/run-tests.py Wed Jan 29 18:56:20 2025 +0100 +++ b/tests/run-tests.py Fri Jan 24 23:06:59 2025 +0100 @@ -3291,10 +3291,9 @@ self._pythondir = get_site_packages_dir(python_exe) except (FileNotFoundError, subprocess.CalledProcessError): self._pythondir = self._bindir - elif self.options.local: - assert WINDOWS - python_exe = os.path.join(self._bindir, b"python.exe") - self._pythondir = get_site_packages_dir(python_exe) + if self.options.local: + self._python = _bytes2sys(python_exe) + # If it looks like our in-repo Rust binary, use the source root. # This is a bit hacky. But rhg is still not supported outside the # source directory. So until it is, do the simple thing.