Skip to content

Commit ad35fc2

Browse files
committed
fix test, bump crosshair
1 parent 6c20067 commit ad35fc2

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

hypothesis-python/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ pandas = ["pandas>=1.1"]
111111
pytest = ["pytest>=4.6"]
112112
dpcontracts = ["dpcontracts>=0.4"]
113113
redis = ["redis>=3.0.0"]
114-
crosshair = ["hypothesis-crosshair>=0.0.24", "crosshair-tool>=0.0.93"]
114+
crosshair = ["hypothesis-crosshair>=0.0.25", "crosshair-tool>=0.0.93"]
115115
# zoneinfo is an odd one: every dependency is platform-conditional.
116116
zoneinfo = ["tzdata>=2025.2; sys_platform == 'win32' or sys_platform == 'emscripten'"]
117117
# We only support Django versions with upstream support - see
@@ -121,7 +121,7 @@ zoneinfo = ["tzdata>=2025.2; sys_platform == 'win32' or sys_platform == 'emscrip
121121
django = ["django>=4.2"]
122122
watchdog = ["watchdog>=4.0.0"]
123123
# Avoid changing this by hand. This is automatically updated by update_changelog_and_version
124-
all = ["black>=19.10b0", "click>=7.0", "crosshair-tool>=0.0.93", "django>=4.2", "dpcontracts>=0.4", "hypothesis-crosshair>=0.0.24", "lark>=0.10.1", "libcst>=0.3.16", "numpy>=1.19.3", "pandas>=1.1", "pytest>=4.6", "python-dateutil>=1.4", "pytz>=2014.1", "redis>=3.0.0", "rich>=9.0.0", "tzdata>=2025.2; sys_platform == 'win32' or sys_platform == 'emscripten'", "watchdog>=4.0.0"]
124+
all = ["black>=19.10b0", "click>=7.0", "crosshair-tool>=0.0.93", "django>=4.2", "dpcontracts>=0.4", "hypothesis-crosshair>=0.0.25", "lark>=0.10.1", "libcst>=0.3.16", "numpy>=1.19.3", "pandas>=1.1", "pytest>=4.6", "python-dateutil>=1.4", "pytz>=2014.1", "redis>=3.0.0", "rich>=9.0.0", "tzdata>=2025.2; sys_platform == 'win32' or sys_platform == 'emscripten'", "watchdog>=4.0.0"]
125125

126126
[tool.setuptools.dynamic]
127127
version = {attr = "hypothesis.version.__version__"}

hypothesis-python/tests/cover/test_statistical_events.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
strategies as st,
2727
target,
2828
)
29+
from hypothesis.control import current_build_context
2930
from hypothesis.statistics import collector, describe_statistics
3031

3132
from tests.common.utils import Why, xfail_on_crosshair
@@ -87,6 +88,9 @@ def __str__(self):
8788

8889

8990
def test_formats_are_evaluated_only_once():
91+
if current_build_context().data.provider.avoid_realization:
92+
pytest.skip("event() cache is disabled under avoid_realization = True")
93+
9094
global counter
9195
counter = 0
9296

@@ -254,8 +258,6 @@ def threshold(error):
254258
assert stats["targets"]["error"] > 10
255259

256260

257-
# describe_statistics causes not-deterministic crosshair errors for some reason?
258-
@xfail_on_crosshair(Why.other)
259261
def test_statistics_with_events_and_target():
260262
@given(st.integers(0, 10_000))
261263
def test(value):

requirements/crosshair.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ execnet==2.1.1
2828
# via pytest-xdist
2929
hypothesis==6.135.14
3030
# via hypothesis-crosshair
31-
hypothesis-crosshair==0.0.24
31+
hypothesis-crosshair==0.0.25
3232
# via -r requirements/crosshair.in
3333
importlib-metadata==8.6.1
3434
# via crosshair-tool

0 commit comments

Comments
 (0)