-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better double asterisk support #769
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -281,7 +281,8 @@ def test_info(s3): | |
s3.mkdir(new_parent) | ||
with pytest.raises(FileNotFoundError): | ||
s3.info(new_parent) | ||
s3.ls(new_parent) | ||
with pytest.raises(FileNotFoundError): | ||
s3.ls(new_parent) | ||
with pytest.raises(FileNotFoundError): | ||
s3.info(new_parent) | ||
|
||
|
@@ -2070,9 +2071,13 @@ def test_via_fsspec(s3): | |
import fsspec | ||
|
||
s3.mkdir("mine") | ||
with fsspec.open("mine/oi", "wb") as f: | ||
with fsspec.open( | ||
"s3://mine/oi", "wb", client_kwargs={"endpoint_url": endpoint_uri} | ||
) as f: | ||
f.write(b"hello") | ||
with fsspec.open("mine/oi", "rb") as f: | ||
with fsspec.open( | ||
"s3://mine/oi", "rb", client_kwargs={"endpoint_url": endpoint_uri} | ||
) as f: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test is unrelated to glob double asterisk but I think it was wrong. It tested the |
||
assert f.read() == b"hello" | ||
|
||
|
||
|
@@ -2151,11 +2156,11 @@ def test_shallow_find(s3): | |
``maxdepth=1``, the results of ``find`` should be the same as those of | ||
``ls``, without returning subdirectories. See also issue 378. | ||
""" | ||
|
||
assert s3.ls(test_bucket_name) == s3.find( | ||
ls_output = s3.ls(test_bucket_name) | ||
assert sorted(ls_output + [test_bucket_name]) == s3.find( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
test_bucket_name, maxdepth=1, withdirs=True | ||
) | ||
assert s3.ls(test_bucket_name) == s3.glob(test_bucket_name + "/*") | ||
assert ls_output == s3.glob(test_bucket_name + "/*") | ||
|
||
|
||
def test_multi_find(s3): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should raise
FileNotFoundError
when no files are found to be consistent.