Fixed issue where pickle helpers didnt use new from_bytes with context

- Added with context to benchmarks that use with_bytes
This commit is contained in:
Madhava Jay
2022-05-24 11:38:27 +10:00
parent 26de61d847
commit fc617142c0
5 changed files with 17 additions and 16 deletions

View File

@@ -13,7 +13,8 @@ import test_capnp # noqa: E402
def decode(name):
class_name = name[0].upper() + name[1:]
print(getattr(test_capnp, class_name).from_bytes(sys.stdin.read())._short_str())
with getattr(test_capnp, class_name).from_bytes(sys.stdin.read()) as msg:
print(msg._short_str())
def encode(name):