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

Function test_ensure_bytes

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

arrayFunction · 0.90
ensure_bytesFunction · 0.90

Tested by

no test coverage detected