[PATCH] tests: fix the test for pypy

timeless timeless at gmail.com
Tue Apr 5 13:52:19 EDT 2016


Assuming re is tolerant, it could be (number|number)

Otherwise, we could use the approach I've been suggesting (run command and
resurrect output to a file, then in #if cat the file , and in #else or
other #if's cat the file).

I think I sent a hghave pypy patch, if not, I have one waiting...
On Apr 5, 2016 12:02 PM, "Pierre-Yves David" <pierre-yves.david at ens-lyon.org>
wrote:



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

_______________________________________________
Mercurial-devel mailing list
Mercurial-devel at mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20160405/24ad15bb/attachment.html>


More information about the Mercurial-devel mailing list