Skip to content
This repository was archived by the owner on Jan 7, 2023. It is now read-only.

Commit d46075f

Browse files
committed
100% test coverage
1 parent 42b9da7 commit d46075f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

root_numpy/tests.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,16 @@ def test_tree2array():
245245
def test_tree2rec():
246246
chain = TChain('tree')
247247
chain.Add(load('single1.root'))
248-
check_single(rnp.tree2array(chain))
248+
check_single(rnp.tree2rec(chain))
249+
250+
251+
def test_single_branch():
252+
f = get_file('single1.root')
253+
tree = f.Get('tree')
254+
arr1_1d = rnp.tree2array(tree, branches='n_int')
255+
arr2_1d = rnp.root2array(load('single1.root'), branches='n_int')
256+
assert_equal(arr1_1d.dtype, np.dtype('<i4'))
257+
assert_equal(arr2_1d.dtype, np.dtype('<i4'))
249258

250259

251260
def test_selection():

0 commit comments

Comments
 (0)