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

Function test_py_filesystem_lifetime

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

Source from the content-addressed store, hash-verified

1809
1810
1811def test_py_filesystem_lifetime():
1812 handler = DummyHandler()
1813 fs = PyFileSystem(handler)
1814 assert isinstance(fs, PyFileSystem)
1815 wr = weakref.ref(handler)
1816 handler = None
1817 assert wr() is not None
1818 fs = None
1819 assert wr() is None
1820
1821 # Taking the .handler attribute doesn't wreck reference counts
1822 handler = DummyHandler()
1823 fs = PyFileSystem(handler)
1824 wr = weakref.ref(handler)
1825 handler = None
1826 assert wr() is fs.handler
1827 assert wr() is not None
1828 fs = None
1829 assert wr() is None
1830
1831
1832def test_py_filesystem_get_file_info():

Callers

nothing calls this directly

Calls 1

DummyHandlerClass · 0.85

Tested by

no test coverage detected