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

Function test_py_filesystem_get_file_info

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

Source from the content-addressed store, hash-verified

1830
1831
1832def test_py_filesystem_get_file_info():
1833 handler = DummyHandler()
1834 fs = PyFileSystem(handler)
1835
1836 [info] = fs.get_file_info(['some/dir'])
1837 assert info.path == 'some/dir'
1838 assert info.type == FileType.Directory
1839
1840 [info] = fs.get_file_info(['some/file'])
1841 assert info.path == 'some/file'
1842 assert info.type == FileType.File
1843
1844 [info] = fs.get_file_info(['notfound'])
1845 assert info.path == 'notfound'
1846 assert info.type == FileType.NotFound
1847
1848 with pytest.raises(TypeError):
1849 fs.get_file_info(['badtype'])
1850
1851 with pytest.raises(IOError):
1852 fs.get_file_info(['xxx'])
1853
1854
1855def test_py_filesystem_get_file_info_selector():

Callers

nothing calls this directly

Calls 2

DummyHandlerClass · 0.85
get_file_infoMethod · 0.45

Tested by

no test coverage detected