MCPcopy Create free account
hub / github.com/apache/arrow / test_filesystem_pickling

Function test_filesystem_pickling

python/pyarrow/tests/test_fs.py:660–668  ·  view source on GitHub ↗
(fs, pickle_with_and_without_subtree_filesystem)

Source from the content-addressed store, hash-verified

658
659
660def test_filesystem_pickling(fs, pickle_with_and_without_subtree_filesystem):
661 pickle_module = pickle_with_and_without_subtree_filesystem
662 if fs.type_name.split('::')[-1] == 'mock':
663 pytest.xfail(reason='MockFileSystem is not serializable')
664
665 serialized = pickle_module.dumps(fs)
666 restored = pickle_module.loads(serialized)
667 assert isinstance(restored, FileSystem)
668 assert restored.equals(fs)
669
670
671def test_filesystem_is_functional_after_pickling(

Callers

nothing calls this directly

Calls 3

dumpsMethod · 0.80
loadsMethod · 0.80
equalsMethod · 0.80

Tested by

no test coverage detected