(tempdir)
| 2765 | |
| 2766 | @pytest.mark.parquet |
| 2767 | def test_open_dataset_filesystem(tempdir): |
| 2768 | # single file |
| 2769 | table, path = _create_single_file(tempdir) |
| 2770 | |
| 2771 | # filesystem inferred from path |
| 2772 | dataset1 = ds.dataset(str(path)) |
| 2773 | assert dataset1.schema.equals(table.schema) |
| 2774 | |
| 2775 | # filesystem specified |
| 2776 | dataset2 = ds.dataset(str(path), filesystem=fs.LocalFileSystem()) |
| 2777 | assert dataset2.schema.equals(table.schema) |
| 2778 | |
| 2779 | # local filesystem specified with relative path |
| 2780 | with change_cwd(tempdir): |
| 2781 | dataset3 = ds.dataset("test.parquet", filesystem=fs.LocalFileSystem()) |
| 2782 | assert dataset3.schema.equals(table.schema) |
| 2783 | |
| 2784 | # passing different filesystem |
| 2785 | with pytest.raises(FileNotFoundError): |
| 2786 | ds.dataset(str(path), filesystem=fs._MockFileSystem()) |
| 2787 | |
| 2788 | |
| 2789 | @pytest.mark.parquet |
nothing calls this directly
no test coverage detected