This is an archive of the discontinued Mercurial Phabricator instance.

tests: suppress read(-1) -> '' calls in fileobjectobserver
ClosedPublic

Authored by durin42 on Jun 14 2018, 12:11 PM.

Details

Summary

This stabilizes the test output of the low-level wireproto tests
between Python 2 and 3. I don't feel great about this change, but
otherwise we get a ton of extra read(-1) output on Python 3, and this
feels like a more sustainable solution.

Bonus: test-ssh-proto-unbundle.t now passes on Python 3.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

durin42 created this revision.Jun 14 2018, 12:11 PM

@indygreg I'm not sure if this undermines your testing strategy at all, but if it does we can try and figure out another path forward...

This revision was automatically updated to reflect the committed changes.

So Python 3 is performing a lot more read(-1) calls than Python 2? That, uh, seems weird and might be worth investigating.

Hiding the read() calls does undermine the tests somewhat. But it's not a deal breaker. Let's keep this commit and keep this excessive read(-1) issue in the back of our heads.