Skip to content

Commit

Permalink
added test for local path mkdir function
Browse files Browse the repository at this point in the history
  • Loading branch information
parthban-db committed Jun 12, 2024
1 parent 16dc404 commit bf00c9b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_dbfs_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,11 @@ def test_fs_path_invalid(config):
with pytest.raises(ValueError) as e:
dbfs_ext._path('s3://path/to/file')
assert 'unsupported scheme "s3"' in str(e.value)


def test_dbfs_local_path_mkdir(config, tmp_path):
from databricks.sdk import WorkspaceClient

w = WorkspaceClient(config=config)
w.dbfs._path(f'file:{tmp_path}/test_dir').mkdir()
assert w.dbfs.exists(f'file:{tmp_path}/test_dir')

0 comments on commit bf00c9b

Please sign in to comment.