MCPcopy Create free account
hub / github.com/apache/qpid-proton / decode_data_file

Method decode_data_file

python/tests/proton_tests/interop.py:64–72  ·  view source on GitHub ↗
(self, name)

Source from the content-addressed store, hash-verified

62 self.data.rewind()
63
64 def decode_data_file(self, name):
65 encoded = self.get_data(name)
66 self.decode_data(encoded)
67 encoded_size = self.data.encoded_size()
68 # Re-encode and verify pre-computed and actual encoded size match.
69 reencoded = self.data.encode()
70 assert encoded_size == len(reencoded), "%d != %d" % (encoded_size, len(reencoded))
71 # verify round trip bytes
72 assert reencoded == encoded, "Value mismatch: %s != %s" % (reencoded, encoded)
73
74 def decode_message_file(self, name):
75 self.message.decode(self.get_data(name))

Callers 7

test_primitivesMethod · 0.95
test_stringsMethod · 0.95
test_describedMethod · 0.95
test_described_arrayMethod · 0.95
test_arraysMethod · 0.95
test_listsMethod · 0.95
test_mapsMethod · 0.95

Calls 4

get_dataMethod · 0.95
decode_dataMethod · 0.95
encoded_sizeMethod · 0.80
encodeMethod · 0.45

Tested by 7

test_primitivesMethod · 0.76
test_stringsMethod · 0.76
test_describedMethod · 0.76
test_described_arrayMethod · 0.76
test_arraysMethod · 0.76
test_listsMethod · 0.76
test_mapsMethod · 0.76