MCPcopy Create free account
hub / github.com/dask/dask / test_ensure_bytes

Function test_ensure_bytes

dask/tests/test_utils.py:52–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50
51
52def test_ensure_bytes():
53 data = [b"1", "1", memoryview(b"1"), bytearray(b"1"), array("B", b"1")]
54 for d in data:
55 result = ensure_bytes(d)
56 assert isinstance(result, bytes)
57 assert result == b"1"
58
59
60def test_ensure_bytes_ndarray():

Callers

nothing calls this directly

Calls 2

arrayFunction · 0.90
ensure_bytesFunction · 0.90

Tested by

no test coverage detected