[PATCH] tests: fix the test for pypy

Augie Fackler raf at durin42.com
Tue Apr 5 11:23:58 EDT 2016


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)
>    sampling from both directions
>    searching: 5 queries
> -  query 5; still undecided: 292, sample size is: 200
> +  query 5; still undecided: \d+, sample size is: 200 (re)
>    sampling from both directions
>    searching: 6 queries
> -  query 6; still undecided: 51, sample size is: 51
> +  query 6; still undecided: \d+, sample size is: \d+ (re)
>    6 total queries
>    common heads: 3ee37d65064a
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list