From 70dd793102a37fb24a4327be0535b17f30dce090 Mon Sep 17 00:00:00 2001 From: Zac-HD Date: Wed, 9 Jun 2021 13:16:44 +1000 Subject: [PATCH] Explain mode requires shrinking With shrinking disabled you get *a* result, but the "always observed for failing examples" part is pretty vacuous. --- hypothesis-python/RELEASE.rst | 4 ++++ hypothesis-python/src/hypothesis/core.py | 1 + 2 files changed, 5 insertions(+) create mode 100644 hypothesis-python/RELEASE.rst diff --git a/hypothesis-python/RELEASE.rst b/hypothesis-python/RELEASE.rst new file mode 100644 index 0000000000..5af01ac948 --- /dev/null +++ b/hypothesis-python/RELEASE.rst @@ -0,0 +1,4 @@ +RELEASE_TYPE: minor + +The :ref:`explain phase ` now requires shrinking to be enabled, +and will be automatically skipped for deadline-exceeded errors. diff --git a/hypothesis-python/src/hypothesis/core.py b/hypothesis-python/src/hypothesis/core.py index d646977c60..947a8ac024 100644 --- a/hypothesis-python/src/hypothesis/core.py +++ b/hypothesis-python/src/hypothesis/core.py @@ -670,6 +670,7 @@ def _execute_once_for_engine(self, data): if ( self.failed_normally and not self.failed_over_deadline + and Phase.shrink in self.settings.phases and Phase.explain in self.settings.phases and sys.gettrace() is None and not PYPY