(value: int, tmp_path)
| 320 | |
| 321 | |
| 322 | def run_java_single_varint(value: int, tmp_path) -> int: |
| 323 | # Write single varint to file |
| 324 | with open(tmp_path / "py_single_varint.out", "wb") as stream: |
| 325 | betterproto.dump_varint(value, stream) |
| 326 | |
| 327 | # Have Java read this varint and write it back |
| 328 | run_jar("single_varint", tmp_path) |
| 329 | |
| 330 | # Read single varint from Java output file |
| 331 | with open(tmp_path / "java_single_varint.out", "rb") as stream: |
| 332 | returned = betterproto.load_varint(stream) |
| 333 | with pytest.raises(EOFError): |
| 334 | betterproto.load_varint(stream) |
| 335 | |
| 336 | return returned |
| 337 | |
| 338 | |
| 339 | def test_single_varint(compile_jar, tmp_path): |
no test coverage detected