Patchwork [1,of,2,STABLE] hghave.py: make Hypothesis testing more sensitive

login
register
mail settings
Submitter timeless@mozdev.org
Date March 8, 2016, 2:33 p.m.
Message ID <7ff966bbfb67fd81003a.1457447586@waste.org>
Download mbox | patch
Permalink /patch/13681/
State Accepted
Headers show

Comments

timeless@mozdev.org - March 8, 2016, 2:33 p.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1457447490 0
#      Tue Mar 08 14:31:30 2016 +0000
# Branch stable
# Node ID 7ff966bbfb67fd81003a15748bf2cab91cf59065
# Parent  8949d73b2e1f5c0b9c4c6c195bef2fe284349c6e
hghave.py: make Hypothesis testing more sensitive

On my system, I have some Hypothesis, but apparently not a working version,
thus the tests fail:

test-encoding.t.err
@@ -278,8 +278,9 @@
 #if hypothesis

   >>> from hypothesishelpers import *
+  ImportError('No module named settings',)
   >>> from mercurial import encoding
   >>> roundtrips(st.binary(), encoding.fromutf8b, encoding.toutf8b)
-  Round trip OK
+  NameError("name 'roundtrips' is not defined",)

 #endif
timeless - March 8, 2016, 2:47 p.m.
Either something like this should be on stable, or 84513a4fcc3a should
be graft to stable.

As is these tests fail for me on stable:
test-template-engine.t
test-encoding.t
using hypothesis 3.0.5.

I'm not picky about how we get them to pass.
Augie Fackler - March 8, 2016, 3:59 p.m.
On Tue, Mar 08, 2016 at 09:47:34AM -0500, timeless wrote:
> Either something like this should be on stable, or 84513a4fcc3a should
> be graft to stable.

I've done the requested graft.

>
> As is these tests fail for me on stable:
> test-template-engine.t
> test-encoding.t
> using hypothesis 3.0.5.
>
> I'm not picky about how we get them to pass.
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -474,6 +474,7 @@ 
     try:
         import hypothesis
         hypothesis.given
+        import hypothesis.settings
         return True
     except ImportError:
         return False