()
| 2273 | |
| 2274 | |
| 2275 | def test_huggingface_filesystem_from_uri(): |
| 2276 | pytest.importorskip("fsspec") |
| 2277 | try: |
| 2278 | from huggingface_hub import HfFileSystem |
| 2279 | except ImportError: |
| 2280 | pytest.skip("huggingface_hub not installed") |
| 2281 | |
| 2282 | fs, path = FileSystem.from_uri( |
| 2283 | "hf://datasets/stanfordnlp/imdb/plain_text/train-00000-of-00001.parquet" |
| 2284 | ) |
| 2285 | expected_fs = PyFileSystem(FSSpecHandler(HfFileSystem())) |
| 2286 | assert fs == expected_fs |
| 2287 | assert path == "datasets/stanfordnlp/imdb/plain_text/train-00000-of-00001.parquet" |
nothing calls this directly
no test coverage detected