aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2019-02-08 00:54:09 +0100
committerArmin Rigo <arigo@tunes.org>2019-02-08 00:54:09 +0100
commitdcdfb9ead9dbcd383c35845f49ad66067696bc76 (patch)
treec83dbefed8258a03c78b5fe70e0f37e0eae04899
parentfix the version number AGAIN (diff)
downloadpypy-dcdfb9ead9dbcd383c35845f49ad66067696bc76.tar.gz
pypy-dcdfb9ead9dbcd383c35845f49ad66067696bc76.tar.bz2
pypy-dcdfb9ead9dbcd383c35845f49ad66067696bc76.zip
Crashes with too-old versions of hypothesis. Turn crashes into warningsrelease-pypy3.5-v7.0.0
-rw-r--r--rpython/conftest.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/rpython/conftest.py b/rpython/conftest.py
index 26905afab5..c080730742 100644
--- a/rpython/conftest.py
+++ b/rpython/conftest.py
@@ -6,15 +6,16 @@ pytest_plugins = 'rpython.tool.pytest.expecttest'
option = None
try:
- from hypothesis import settings, __version__
+ from hypothesis import settings
except ImportError:
pass
else:
- if __version__[:2] < '3.6':
- s = settings(deadline=None)
- settings.register_profile('default', s)
- else:
+ try:
settings.register_profile('default', deadline=None)
+ except Exception:
+ import warnings
+ warnings.warn("Version of hypothesis too old, "
+ "cannot set the deadline to None")
settings.load_profile('default')
def braindead_deindent(self):