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