MCPcopy
hub / github.com/huggingface/datasets / assert_pickle_does_bring_data_in_memory

Function assert_pickle_does_bring_data_in_memory

tests/test_table.py:91–96  ·  view source on GitHub ↗
(table: MemoryMappedTable)

Source from the content-addressed store, hash-verified

89
90
91def assert_pickle_does_bring_data_in_memory(table: MemoryMappedTable):
92 with assert_arrow_memory_increases():
93 pickled_table = pickle.dumps(table)
94 unpickled_table = pickle.loads(pickled_table)
95 assert isinstance(unpickled_table, MemoryMappedTable)
96 assert unpickled_table.table == table.table
97
98
99def assert_index_attributes_equal(table: Table, other: Table):

Callers 2

Calls 1

Tested by

no test coverage detected