Traktor/myenv/Lib/site-packages/fsspec/tests/test_gui.py
2024-05-23 01:57:24 +02:00

24 lines
508 B
Python

import pytest
panel = pytest.importorskip("panel")
def test_basic():
import fsspec.gui
gui = fsspec.gui.FileSelector()
assert "url" in str(gui.panel)
def test_kwargs(tmpdir):
"""confirm kwargs are passed to the filesystem instance"""
import fsspec.gui
gui = fsspec.gui.FileSelector(f"file://{tmpdir}", kwargs="{'auto_mkdir': True}")
assert gui.fs.auto_mkdir
gui = fsspec.gui.FileSelector(f"file://{tmpdir}", kwargs={"auto_mkdir": True})
assert gui.fs.auto_mkdir