( )⚙ D6658 py3: fix test-setdiscovery.t on Python 3 by conditionalizing two lines

This is an archive of the discontinued Mercurial Phabricator instance.

py3: fix test-setdiscovery.t on Python 3 by conditionalizing two lines
ClosedPublic

Authored by durin42 on Jul 18 2019, 2:24 PM.

Details

Summary

I'm not clear why this behaves very slightly differently on Python 3,
but I'm also not concerned about it.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

durin42 created this revision.Jul 18 2019, 2:24 PM
martinvonz accepted this revision.Jul 21 2019, 10:24 AM
martinvonz added a subscriber: martinvonz.

Heh, I wrote a patch for this before I saw yours. The problem is that random.sample() (and other integer-based functions) changed, see https://bugs.python.org/issue27742.

This revision is now accepted and ready to land.Jul 21 2019, 10:24 AM
martinvonz added inline comments.Jul 21 2019, 8:24 PM
tests/test-setdiscovery.t
988

Fixing this in flight to be 187 in both places :)

martinvonz added inline comments.Jul 22 2019, 12:54 PM
tests/test-setdiscovery.t
988

But then the old commit was accepted, so the bad version is now public. I'll send a fix instead.