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
commit7b51bd10d0e27c7dc81d7efb7afea87f5c940642 (patch)
tree9f0772e7c98a7f49f33f0866b399a887c554b970
parentmerge default into release (diff)
downloadpypy-7b51bd10d0e27c7dc81d7efb7afea87f5c940642.tar.gz
pypy-7b51bd10d0e27c7dc81d7efb7afea87f5c940642.tar.bz2
pypy-7b51bd10d0e27c7dc81d7efb7afea87f5c940642.zip
Crashes with too-old versions of hypothesis. Turn crashes into warningsrelease-pypy2.7-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):