Skip to content

Commit

Permalink
Addressing Gal's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
alxtkr77 committed Aug 3, 2023
1 parent 1fd0aef commit 820b022
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion integration/test_filesystems_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import pandas as pd
import pytest
import v3io
from fsspec.implementations.local import LocalFileSystem

from integration.integration_test_utils import V3ioHeaders, _generate_table_name
from storey import (
Expand All @@ -38,7 +39,7 @@
build_flow,
)
from storey.dtypes import V3ioError
from storey.utils import get_remaining_path
from storey.utils import get_remaining_path, url_to_file_system


@pytest.fixture()
Expand Down Expand Up @@ -672,3 +673,10 @@ def test_get_path_utils():
schema, path = get_remaining_path(url)
assert path == "mycontainer/path/to/object.csv"
assert schema == "wasbs"


def test_ds_get_path_utils():
url = "ds://:file@profile/path/to/object.csv"
fs, path = url_to_file_system(url, "")
assert path == "/path/to/object.csv"
assert isinstance(fs, LocalFileSystem)
2 changes: 1 addition & 1 deletion storey/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def url_to_file_system(url, storage_options):
if parsed_url.password:
scheme = parsed_url.password
else:
raise ValueError("Datastore profile URL expecting to have underlying scheme embedded as a password")
raise ValueError("Datastore profile URL is expected to have underlying scheme embedded as password")
if scheme:
load_fs_dependencies(scheme)

Expand Down

0 comments on commit 820b022

Please sign in to comment.