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
--- 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)