aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/hypothesis/py3/_hypothesis_pytestplugin.py
diff options
context:
space:
mode:
authorAlexSm <alex@ydb.tech>2023-12-27 23:31:58 +0100
committerGitHub <noreply@github.com>2023-12-27 23:31:58 +0100
commitd67bfb4b4b7549081543e87a31bc6cb5c46ac973 (patch)
tree8674f2f1570877cb653e7ddcff37ba00288de15a /contrib/python/hypothesis/py3/_hypothesis_pytestplugin.py
parent1f6bef05ed441c3aa2d565ac792b26cded704ac7 (diff)
downloadydb-d67bfb4b4b7549081543e87a31bc6cb5c46ac973.tar.gz
Import libs 4 (#758)
Diffstat (limited to 'contrib/python/hypothesis/py3/_hypothesis_pytestplugin.py')
-rw-r--r--contrib/python/hypothesis/py3/_hypothesis_pytestplugin.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/contrib/python/hypothesis/py3/_hypothesis_pytestplugin.py b/contrib/python/hypothesis/py3/_hypothesis_pytestplugin.py
index 3bb2535f3b..9875e067f5 100644
--- a/contrib/python/hypothesis/py3/_hypothesis_pytestplugin.py
+++ b/contrib/python/hypothesis/py3/_hypothesis_pytestplugin.py
@@ -373,6 +373,13 @@ else:
if fex:
failing_examples.append(json.loads(fex))
+ from hypothesis.internal.observability import _WROTE_TO
+
+ if _WROTE_TO:
+ terminalreporter.section("Hypothesis")
+ for fname in sorted(_WROTE_TO):
+ terminalreporter.write_line(f"observations written to {fname}")
+
if failing_examples:
# This must have been imported already to write the failing examples
from hypothesis.extra._patching import gc_patches, make_patch, save_patch
@@ -384,7 +391,8 @@ else:
except Exception:
# fail gracefully if we hit any filesystem or permissions problems
return
- terminalreporter.section("Hypothesis")
+ if not _WROTE_TO:
+ terminalreporter.section("Hypothesis")
terminalreporter.write_line(
f"`git apply {fname}` to add failing examples to your code."
)