Traktor/myenv/Lib/site-packages/fsspec/tests/test_gui.py

24 lines
508 B
Python
Raw Normal View History

2024-05-26 05:12:46 +02:00
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