-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fallback to reading streamer and raise better error messages on true …
…failures. (#28) * Fallback to reading streamer and raise better error messages on true failures. * Pass context down to Cursor. * Black and flake8. * Passed context all the way down to Chunk. * This is a good error message. * Fallback for wrong streamers works.
- Loading branch information
Showing
22 changed files
with
413 additions
and
215 deletions.
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# BSD 3-Clause License; see https://github.com/scikit-hep/uproot4/blob/master/LICENSE | ||
|
||
from __future__ import absolute_import | ||
|
||
import numpy | ||
import pytest | ||
import skhep_testdata | ||
|
||
import uproot4 | ||
|
||
|
||
def test_fallback_reading(): | ||
with uproot4.open( | ||
skhep_testdata.data_path("uproot-small-evnt-tree-fullsplit.root") | ||
) as f: | ||
f["tree:evt/P3/P3.Py"] | ||
assert f.file._streamers is None | ||
|
||
with uproot4.open(skhep_testdata.data_path("uproot-demo-double32.root")) as f: | ||
f["T/fD64"] | ||
assert f.file._streamers is not None |
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
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
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
Oops, something went wrong.