MCPcopy Create free account
hub / github.com/cdgriffith/Box / test_to_msgpack

Method test_to_msgpack

test/test_converters.py:87–93  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

85 assert yaml.load(open(m_file)) == yaml.load(movie_string)
86
87 def test_to_msgpack(self):
88 m_file = os.path.join(tmp_dir, "movie_data")
89 msg_data = _to_msgpack(movie_data)
90 assert b"Rick Moranis" in msg_data
91 _to_msgpack(movie_data, filename=m_file)
92 assert b"Rick Moranis" in open(m_file, "rb").read()
93 assert msgpack.unpack(open(m_file, "rb")) == msgpack.unpackb(msg_data)
94
95 def test_to_yaml_ruamel(self):
96 movie_string = _to_yaml(movie_data, ruamel_attrs={"width": 12})

Callers

nothing calls this directly

Calls 1

_to_msgpackFunction · 0.90

Tested by

no test coverage detected