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

Function test_py_filesystem_equality

python/pyarrow/tests/test_fs.py:1778–1795  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1776
1777
1778def test_py_filesystem_equality():
1779 handler1 = DummyHandler(1)
1780 handler2 = DummyHandler(2)
1781 handler3 = DummyHandler(2)
1782 fs1 = PyFileSystem(handler1)
1783 fs2 = PyFileSystem(handler1)
1784 fs3 = PyFileSystem(handler2)
1785 fs4 = PyFileSystem(handler3)
1786
1787 assert fs2 is not fs1
1788 assert fs3 is not fs2
1789 assert fs4 is not fs3
1790 assert fs2 == fs1 # Same handler
1791 assert fs3 != fs2 # Unequal handlers
1792 assert fs4 == fs3 # Equal handlers
1793
1794 assert fs1 != LocalFileSystem()
1795 assert fs1 != object()
1796
1797
1798def test_py_filesystem_pickling(pickle_with_and_without_subtree_filesystem):

Callers

nothing calls this directly

Calls 2

DummyHandlerClass · 0.85
LocalFileSystemClass · 0.85

Tested by

no test coverage detected