changeset 27999:b30b40804a3f

tests: pass settings of hypothesis by with statement given(..., settings=) is no longer available in Hypothesis 2.0.0. https://github.com/DRMacIver/hypothesis/commit/7712c01
author Yuya Nishihara <yuya@tcha.org>
date Tue, 26 Jan 2016 23:05:19 +0900
parents 84513a4fcc3a
children d4247c306d82
files tests/hypothesishelpers.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/hypothesishelpers.py	Tue Jan 26 22:44:29 2016 +0900
+++ b/tests/hypothesishelpers.py	Tue Jan 26 23:05:19 2016 +0900
@@ -33,7 +33,8 @@
         # Fixed in version 1.13 (released 2015 october 29th)
         f.__module__ = '__anon__'
         try:
-            given(*args, settings=settings(max_examples=2000), **kwargs)(f)()
+            with settings(max_examples=2000):
+                given(*args, **kwargs)(f)()
         except Exception:
             traceback.print_exc(file=sys.stdout)
             sys.exit(1)