This is an archive of the discontinued Mercurial Phabricator instance.

run-tests: make code coverage work on Python 3
ClosedPublic

Authored by indygreg on Oct 17 2019, 11:40 PM.

Details

Summary

This code path was obviously not tested on Python 3 because it
blew up in several places due to str/bytes mismatch.

For internal code, we normalize paths to bytes.

For code calling into coverage, we normalize paths to str,
which is what coverage seems to expect.

After this, run-tests.py -H works on Python 3!

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

indygreg created this revision.Oct 17 2019, 11:40 PM
yuja added a subscriber: yuja.Oct 18 2019, 8:40 AM

Fixed some os.environb and queued, thanks.

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.