[PATCH 4 of 8] setdiscovery: fix the test for pypy

Jun Wu quark at fb.com
Wed Apr 6 22:51:31 EDT 2016


# HG changeset patch
# User Maciej Fijalkowski <fijall at gmail.com>
# Date 1459856658 -10800
#      Tue Apr 05 14:44:18 2016 +0300
# Node ID 44dabb24e6574461faad3c753bf88ec96cb3189d
# Parent  b0cc9652e8dc09ba9b6e99a811ecbfc1380bb272
setdiscovery: fix the test for pypy

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 --git a/tests/test-setdiscovery.t b/tests/test-setdiscovery.t
--- a/tests/test-setdiscovery.t
+++ b/tests/test-setdiscovery.t
@@ -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
 


More information about the Mercurial-devel mailing list