Skip to content

Commit

Permalink
Replaced Pyodide http test to make it more stable (#1296)
Browse files Browse the repository at this point in the history
  • Loading branch information
ariostas authored Sep 20, 2024
1 parent b7dea1f commit 2ba0e4a
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions tests-wasm/test_1272_basic_functionality.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,25 @@ def test_read_rntuple(selenium):
assert len(jets.pt) == len(pbs)


# Taken from test_0088_read_with_http.py
# Taken from test_0034_generic_objects_in_ttrees.py
@pytest.mark.network
@run_test_in_pyodide(packages=["requests"])
def test_read_ttree_http(selenium):
import awkward

import uproot

with uproot.open(
"http://starterkit.web.cern.ch/starterkit/data/advanced-python-2019/dalitzdata.root",
"https://github.com/scikit-hep/scikit-hep-testdata/raw/main/src/skhep_testdata/data/uproot-stl_containers.root",
handler=uproot.source.http.HTTPSource,
) as f:
data = f["tree"].arrays(["Y1", "Y2"], library="np")
assert len(data["Y1"]) == 100000
assert len(data["Y2"]) == 100000
)["tree"] as tree:
assert awkward.to_list(tree["vector_int32"].array(library="ak")) == [
[1],
[1, 2],
[1, 2, 3],
[1, 2, 3, 4],
[1, 2, 3, 4, 5],
]


# Taken from test_1191_rntuple_fixes.py
Expand Down

0 comments on commit 2ba0e4a

Please sign in to comment.