Skip to content

Commit

Permalink
fix: typo in uproot.source.xrootd.XRootDSource name (#990)
Browse files Browse the repository at this point in the history
* Fix typo in `uproot.source.xrootd.XRootDSource` name

* test different handlers for xrootd

---------

Co-authored-by: Luis Antonio Obis Aparicio <luis.antonio.obis@gmail.com>
Co-authored-by: Luis Antonio Obis Aparicio <35803280+lobis@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 13, 2023
1 parent 58ddaaa commit 388395c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/uproot/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def file_path_to_source_class(file_path, options):
elif parsed_url.scheme.upper() == "ROOT":
out = options["xrootd_handler"]
if out is None:
out = uproot.source.root.XRootDSource
out = uproot.source.xrootd.XRootDSource
else:
warnings.warn(
f"""In version 5.2.0, the 'xrootd_handler' argument will be removed from 'uproot.open'. Use
Expand Down
8 changes: 6 additions & 2 deletions tests/test_0692_fsspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,15 @@ def test_open_fsspec_s3():

@pytest.mark.network
@pytest.mark.xrootd
def test_open_fsspec_xrootd():
@pytest.mark.parametrize(
"handler",
[uproot.source.fsspec.FSSpecSource, uproot.source.xrootd.XRootDSource, None],
)
def test_open_fsspec_xrootd(handler):
pytest.importorskip("XRootD")
with uproot.open(
"root://eospublic.cern.ch//eos/root-eos/cms_opendata_2012_nanoaod/Run2012B_DoubleMuParked.root",
handler=uproot.source.fsspec.FSSpecSource,
handler=handler,
) as f:
data = f["Events/run"].array(library="np", entry_stop=20)
assert len(data) == 20
Expand Down

0 comments on commit 388395c

Please sign in to comment.