diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -3170,7 +3170,7 @@ print('WARNING: cannot fix hg.bat reference to python.exe') if self.options.anycoverage: - custom = os.path.join(self._testdir, 'sitecustomize.py') + custom = os.path.join(osenvironb[b'RUNTESTDIR'], 'sitecustomize.py') target = os.path.join(self._pythondir, 'sitecustomize.py') vlog('# Installing coverage trigger to %s' % target) shutil.copyfile(custom, target)