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

Function test_hyp_encode_bytes

tests/test_encoding.py:97–99  ·  view source on GitHub ↗
(make_enc: Callable[[], tiktoken.Encoding], bytestring: bytes)

Source from the content-addressed store, hash-verified

95@hypothesis.given(bytestring=st.binary())
96@hypothesis.settings(deadline=None, max_examples=MAX_EXAMPLES)
97def test_hyp_encode_bytes(make_enc: Callable[[], tiktoken.Encoding], bytestring: bytes):
98 enc = make_enc()
99 assert enc.decode_bytes(enc._encode_bytes(bytestring)) == bytestring
100
101
102def test_encode_surrogate_pairs():

Callers

nothing calls this directly

Calls 2

_encode_bytesMethod · 0.80
decode_bytesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…