Distributed
1.0
▾ distributed
▸ actor
▸ asyncio
▸ batched
▸ bokeh
▸ cfexecutor
▸ cli
▸ client
▸ comm
▸ compatibility
▸ config
▸ core
▸ counter
▸ dashboard
▸ deploy
▸ diagnostics
▸ diskutils
▸ event
▸ http
▸ lock
▸ locket
▸ metrics
▸ nanny
▸ node
▸ preloading
▸ process
▸ proctitle
▸ profile
▾ protocol
▸ arrow
▸ compression
▸ core
▸ cuda
▸ cupy
▸ h5py
▸ highlevelgraph
▸ keras
▸ netcdf4
▸ numba
▸ numpy
▸ pickle
▸ rmm
▸ scipy
▸ serialize
▸ sparse
▾ tests
▸ test_arrow
▸ test_collection
▸ test_collection_cuda
▸ test_cupy
▸ test_h5py
▸ test_highlevelgraph
▸ test_keras
▸ test_netcdf4
▸ test_numba
▸ test_numpy
▸ test_pandas
▸ test_pickle
▸ test_protocol
▸ test_protocol_utils
▸ test_rmm
▸ test_scipy
▾ test_serialize
class
Empty
class
MyObj
class
MyObject
▸ test_sparse
▸ test_torch
▸ torch
▸ utils
▸ publish
▸ pubsub
▸ pytest_resourceleaks
▸ queues
▸ recreate_exceptions
▸ scheduler
▸ security
▸ semaphore
▸ sizeof
▸ stealing
▸ system
▸ system_monitor
▸ tests
▸ threadpoolexecutor
▸ utils
▸ utils_comm
▸ utils_perf
▸ utils_test
▸ variable
▸ versions
▸ worker
▸ worker_client
Module test_serialize
distributed
.
protocol
.
tests
.
test_serialize
source
link
Classes
class
Empty
class
MyObj
class
MyObject
Functions
▷
def
deserialize_empty
(
header, frames
)
source
link
▷
def
deserialize_myobj
(
header, frames
)
source
link
▷
def
my_dumps
(
obj, context=None
)
source
link
▷
def
my_loads
(
header, frames
)
source
link
▷
def
serialize_empty
(
x
)
source
link
▷
def
serialize_myobj
(
x
)
source
link
▷
def
test_Serialize
(
)
source
link
▷
def
test_Serialized
(
)
source
link
▷
def
test_check_dask_serializable
(
data, is_serializable
)
@pytest.mark.parametrize( "data,is_serializable", [ ([], False), ({}, False), ({i: i for i in range(10)}, False), (set(range(10)), False), (tuple(range(100)), False), ({"x": MyObj(5)}, True), ({"x": {"y": MyObj(5)}}, True), pytest.param( [1, MyObj(5)], True, marks=pytest.mark.xfail(reason="Only checks 0th element for now."), ), ([MyObj([0, 1, 2]), 1], True), (tuple([MyObj(None)]), True), ({("x", i): MyObj(5) for i in range(100)}, True), (memoryview(b"hello"), True), (memoryview(np.random.random((3, 4))), True), ], )
@pytest.mark.parametrize( "data,is_serializable", [ ([], False), ({}, False), ({i: i for i in range(10)}, False), (set(range(10)), False), (tuple(range(100)), False), ({"x": MyObj(5)}, True), ({"x": {"y": MyObj(5)}}, True), pytest.param( [1, MyObj(5)], True, marks=pytest.mark.xfail(reason="Only checks 0th element for now."), ), ([MyObj([0, 1, 2]), 1], True), (tuple([MyObj(None)]), True), ({("x", i): MyObj(5) for i in range(100)}, True), (memoryview(b"hello"), True), (memoryview(np.random.random((3, 4))), True), ], )
def
test_check_dask_serializable(
data,
is_serializable,
)
source
link
▷
def
test_compression_numpy_list
(
)
source
link
▷
def
test_deser_memoryview
(
data_in
)
@pytest.mark.parametrize( "data_in", [memoryview(b"hello"), memoryview(np.random.random((3, 4)))] )
@pytest.mark.parametrize( "data_in", [memoryview(b"hello"), memoryview(np.random.random((3, 4)))] )
def
test_deser_memoryview(
data_in
)
source
link
▷
def
test_dumps_serialize
(
)
source
link
▷
def
test_empty
(
)
source
link
▷
def
test_empty_loads
(
)
source
link
▷
def
test_empty_loads_deep
(
)
source
link
▷
def
test_errors
(
)
source
link
▷
def
test_malicious_exception
(
)
source
link
▷
def
test_nested_deserialize
(
)
source
link
▷
def
test_ser_memoryview_object
(
)
source
link
▷
def
test_serialize_arrays
(
typecode
)
@pytest.mark.parametrize( "typecode", ["b", "B", "h", "H", "i", "I", "l", "L", "q", "Q", "f", "d"] )
@pytest.mark.parametrize( "typecode", ["b", "B", "h", "H", "i", "I", "l", "L", "q", "Q", "f", "d"] )
def
test_serialize_arrays(
typecode
)
source
link
▷
def
test_serialize_bytes
(
kwargs
)
@pytest.mark.parametrize("kwargs", [{}, {"serializers": ["pickle"]}])
@pytest.mark.parametrize("kwargs", [{}, {"serializers": ["pickle"]}])
def
test_serialize_bytes(
kwargs
)
source
link
▷
def
test_serialize_bytestrings
(
)
source
link
▷
def
test_serialize_list_compress
(
)
source
link
▷
def
test_serialize_lists
(
serializers
)
@pytest.mark.parametrize( "serializers", [["msgpack"], ["pickle"], ["msgpack", "pickle"], ["pickle", "msgpack"]], )
@pytest.mark.parametrize( "serializers", [["msgpack"], ["pickle"], ["msgpack", "pickle"], ["pickle", "msgpack"]], )
def
test_serialize_lists(
serializers
)
source
link
▷
def
test_serialize_raises
(
)
source
link
Generated by
nedoc
v0.9 at 2020-12-29 14:05