()
| 209 | |
| 210 | |
| 211 | def test_message_len_empty_string(): |
| 212 | @dataclass |
| 213 | class Empty(betterproto.Message): |
| 214 | string: str = betterproto.string_field(1, "group") |
| 215 | integer: int = betterproto.int32_field(2, "group") |
| 216 | |
| 217 | empty = Empty().from_dict({"string": ""}) |
| 218 | assert len(empty) == len(bytes(empty)) |
| 219 | |
| 220 | |
| 221 | def test_calculate_varint_size_negative(): |