This is an archive of the discontinued Mercurial Phabricator instance.

tests: pass str to matchoutput()
ClosedPublic

Authored by indygreg on Mar 28 2020, 9:40 PM.

Details

Summary

It accepts a str, not bytes.

This fixes a failure in test-hghave.t on Windows. Why it
wasn't failing on Linux, I don't know. I suspect the Windows
process code in Python doesn't accept bytes and the POSIX code
does?

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.Mar 28 2020, 9:40 PM
mharbison72 accepted this revision.Mar 30 2020, 2:37 PM
mharbison72 added a subscriber: mharbison72.

I suspect the Windows process code in Python doesn't accept bytes and the POSIX code does?

That's definitely my experience, and the reason for procutil.tonativestr().

pulkit accepted this revision.Mar 31 2020, 6:16 AM
This revision is now accepted and ready to land.Mar 31 2020, 6:16 AM
This revision was automatically updated to reflect the committed changes.