Skip to content

Commit 962802a

Browse files
committed
Move unused function to test
1 parent c90732c commit 962802a

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

hypothesis-python/src/hypothesis/internal/conjecture/data.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1935,14 +1935,6 @@ def permitted(f):
19351935
}
19361936

19371937

1938-
# eventually we'll want to expose this publicly, but for now it lives as psuedo-internal.
1939-
def realize(value: object) -> object:
1940-
from hypothesis.control import current_build_context
1941-
1942-
context = current_build_context()
1943-
return context.data.provider.realize(value)
1944-
1945-
19461938
class ConjectureData:
19471939
@classmethod
19481940
def for_buffer(

hypothesis-python/tests/conjecture/test_alt_backend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
import pytest
1919

2020
from hypothesis import given, settings, strategies as st
21+
from hypothesis.control import current_build_context
2122
from hypothesis.database import InMemoryExampleDatabase
2223
from hypothesis.errors import Flaky, HypothesisException, InvalidArgument
2324
from hypothesis.internal.compat import int_to_bytes
2425
from hypothesis.internal.conjecture.data import (
2526
AVAILABLE_PROVIDERS,
2627
ConjectureData,
2728
PrimitiveProvider,
28-
realize,
2929
)
3030
from hypothesis.internal.conjecture.engine import ConjectureRunner
3131
from hypothesis.internal.floats import SIGNALING_NAN
@@ -412,7 +412,7 @@ def test_realize():
412412
@given(st.integers())
413413
@settings(backend="realize")
414414
def test_function(n):
415-
values.append(realize(n))
415+
values.append(current_build_context().data.provider.realize(n))
416416

417417
test_function()
418418

0 commit comments

Comments
 (0)