MCPcopy
hub / github.com/saltstack/salt / check_pack_float

Function check_pack_float

tests/pytests/unit/utils/test_msgpack.py:400–402  ·  view source on GitHub ↗
(pack_func, **kwargs)

Source from the content-addressed store, hash-verified

398
399
400def check_pack_float(pack_func, **kwargs):
401 assert b"\xca" + struct.pack(">f", 1.0) == pack_func(1.0, use_single_float=True)
402 assert b"\xcb" + struct.pack(">d", 1.0) == pack_func(1.0, use_single_float=False)
403
404
405def check_odict(pack_func, unpack_func):

Callers

nothing calls this directly

Calls 1

packMethod · 0.45

Tested by

no test coverage detected