Skip to content

Commit

Permalink
fix: correct typo in fsspec globbing (#1067)
Browse files Browse the repository at this point in the history
* use file_path instead of files in fsspec globbing

* Update test_0692_fsspec_reading.py to include different file name varieties

* style: pre-commit fixes

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
lgray and pre-commit-ci[bot] authored Dec 14, 2023
1 parent 151796a commit 094ccde
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/uproot/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ def _regularize_files_inner(
file_names_full = [
file.full_name
for file in fsspec.open_files(
files,
file_path,
**uproot.source.fsspec.FSSpecSource.extract_fsspec_options(options),
)
]
Expand Down
15 changes: 11 additions & 4 deletions tests/test_0692_fsspec_reading.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,20 +392,27 @@ def test_issue_1035(handler):

@pytest.mark.network
@pytest.mark.xrootd
@pytest.mark.parametrize(
"filename",
[
{
"root://eospublic.cern.ch//eos/root-eos/cms_opendata_2012_nanoaod/Run2012B_*.root": "Events"
},
"root://eospublic.cern.ch//eos/root-eos/cms_opendata_2012_nanoaod/Run2012B_*.root:Events",
],
)
@pytest.mark.parametrize(
"handler",
[
uproot.source.fsspec.FSSpecSource,
None,
],
)
def test_fsspec_globbing_xrootd(handler):
def test_fsspec_globbing_xrootd(handler, filename):
pytest.importorskip("XRootD")
pytest.importorskip("fsspec_xrootd")
iterator = uproot.iterate(
{
"root://eospublic.cern.ch//eos/root-eos/cms_opendata_2012_nanoaod/Run2012B_*.root": "Events"
},
filename,
["PV_x"],
handler=handler,
)
Expand Down

0 comments on commit 094ccde

Please sign in to comment.