Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion servicex/data_conversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def do_the_work(file: Path) -> ak.Array:
return uproot.lazy(f"{file}:{tree_name}") # type: ignore

if hasattr(uproot, "dask"):
return uproot.dask(f"{file}:{tree_name}") # type: ignore
return uproot.dask({str(file): tree_name}) # type: ignore

assert (
False
Expand Down
12 changes: 12 additions & 0 deletions tests/test_data_conversions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import shutil
from servicex import ServiceXException
from servicex.data_conversions import DataConverterAdaptor
import pytest
Expand Down Expand Up @@ -62,6 +63,17 @@ async def test_root_to_awkward(good_root_file_path):
check_awkward_accessible(df["JetPt"]) # type: ignore


@pytest.mark.asyncio
async def test_root_to_awkward_postfix_filename(good_root_file_path, tmp_path):
# Found in the wild see #337.
postfix_file = tmp_path / "test.root.1"
shutil.copy(good_root_file_path, postfix_file)

df = await DataConverterAdaptor("root-file").convert_to_awkward(postfix_file)
assert len(df["JetPt"]) == 283458 # type: ignore
check_awkward_accessible(df["JetPt"]) # type: ignore


@pytest.mark.asyncio
async def test_to_awkward_fail(good_root_file_path):
with pytest.raises(ServiceXException):
Expand Down