mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-08 23:09:48 +01:00
17 lines
481 B
Python
17 lines
481 B
Python
import pytest
|
|
|
|
from dvc.fs import HDFSFileSystem
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
"fs_args, expected_url",
|
|
[
|
|
({"host": "example.com"}, "hdfs://example.com"),
|
|
({"host": "example.com", "port": None}, "hdfs://example.com"),
|
|
({"host": "example.com", "port": 8020}, "hdfs://example.com:8020"),
|
|
],
|
|
)
|
|
def test_hdfs_unstrip_protocol(fs_args, expected_url):
|
|
fs = HDFSFileSystem(**fs_args)
|
|
assert fs.unstrip_protocol("/path") == expected_url + "/path"
|