MCPcopy
hub / github.com/openai/tiktoken / test_hyp_roundtrip

Function test_hyp_roundtrip

tests/test_encoding.py:152–155  ·  view source on GitHub ↗
(make_enc: Callable[[], tiktoken.Encoding], text)

Source from the content-addressed store, hash-verified

150@hypothesis.given(text=st.text())
151@hypothesis.settings(deadline=None, max_examples=MAX_EXAMPLES)
152def test_hyp_roundtrip(make_enc: Callable[[], tiktoken.Encoding], text):
153 enc = make_enc()
154
155 assert text == enc.decode(enc.encode(text))
156
157
158@pytest.mark.parametrize("make_enc", ENCODING_FACTORIES)

Callers

nothing calls this directly

Calls 2

decodeMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…