()
| 1830 | |
| 1831 | |
| 1832 | def 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 | |
| 1855 | def test_py_filesystem_get_file_info_selector(): |
nothing calls this directly
no test coverage detected