MCPcopy Create free account
hub / github.com/danielgtaylor/python-betterproto / test_single_varint

Function test_single_varint

tests/test_streams.py:339–349  ·  view source on GitHub ↗
(compile_jar, tmp_path)

Source from the content-addressed store, hash-verified

337
338
339def test_single_varint(compile_jar, tmp_path):
340 single_byte = (1, b"\x01")
341 multi_byte = (123456789, b"\x95\x9A\xEF\x3A")
342
343 # Write a single-byte varint to a file and have Java read it back
344 returned = run_java_single_varint(single_byte[0], tmp_path)
345 assert returned == single_byte
346
347 # Same for a multi-byte varint
348 returned = run_java_single_varint(multi_byte[0], tmp_path)
349 assert returned == multi_byte
350
351
352def test_multiple_varints(compile_jar, tmp_path):

Callers

nothing calls this directly

Calls 1

run_java_single_varintFunction · 0.85

Tested by

no test coverage detected