[PATCH] tests: fix the test for pypy

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Apr 5 12:01:49 EDT 2016



On 04/05/2016 08:23 AM, Augie Fackler wrote:
> On Tue, Apr 05, 2016 at 02:44:27PM +0300, Maciej Fijalkowski wrote:
>> # HG changeset patch
>> # User Maciej Fijalkowski <fijall at gmail.com>
>> # Date 1459856658 -10800
>> #      Tue Apr 05 14:44:18 2016 +0300
>> # Node ID ce57e420902bbf79c03edaef7948f1744e7665d8
>> # Parent  21b2a34556ac42e22f6350827e2168cfdbbf72d1
>> tests: fix the test for pypy
>
> Queued with a less-broad topic, thanks.
>
>>
>> This test relies on the exact details of random.sample
>> given the seed. Things work a bit differently under pypy,
>> make the test less specific
>>
>> diff -r 21b2a34556ac -r ce57e420902b tests/test-setdiscovery.t
>> --- a/tests/test-setdiscovery.t	Tue Apr 05 10:59:46 2016 +0300
>> +++ b/tests/test-setdiscovery.t	Tue Apr 05 14:44:18 2016 +0300
>> @@ -317,13 +317,13 @@
>>     query 3; still undecided: 1140, sample size is: 200
>>     sampling from both directions
>>     searching: 4 queries
>> -  query 4; still undecided: 592, sample size is: 200
>> +  query 4; still undecided: \d+, sample size is: 200 (re)

That matching is pretty broad and would miss more subtle change in the 
algorithme. Since the number seems stable (but different) for both 
cpython and pypy, could we match them explicitly?

(I would happily fix it on the fly in hg-committed, but the patch does 
no seems there yet)

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list