-
Notifications
You must be signed in to change notification settings - Fork 363
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow repeated extra arguments (#1673)
Co-authored-by: Martin Durant <[email protected]>
- Loading branch information
1 parent
952cd98
commit 9d56f92
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -465,3 +465,21 @@ def test_chained_url(ftp_writable): | |
def test_automkdir_local(): | ||
fs, _ = fsspec.core.url_to_fs("file://", auto_mkdir=True) | ||
assert fs.auto_mkdir is True | ||
|
||
|
||
def test_repeated_argument(): | ||
pytest.importorskip("adlfs") | ||
from fsspec.core import url_to_fs | ||
|
||
fs, url = url_to_fs( | ||
"az://[email protected]/DATA", | ||
anon=False, | ||
account_name="ACCOUNT", | ||
) | ||
assert fs.storage_options == {"account_name": "ACCOUNT", "anon": False} | ||
with pytest.raises(TypeError): | ||
url_to_fs( | ||
"az://[email protected]/DATA", | ||
anon=False, | ||
account_name="OTHER", | ||
) |