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

Commit

Permalink
100% test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
ndawe committed May 20, 2015
1 parent 42b9da7 commit d46075f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion root_numpy/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,16 @@ def test_tree2array():
def test_tree2rec():
chain = TChain('tree')
chain.Add(load('single1.root'))
check_single(rnp.tree2array(chain))
check_single(rnp.tree2rec(chain))


def test_single_branch():
f = get_file('single1.root')
tree = f.Get('tree')
arr1_1d = rnp.tree2array(tree, branches='n_int')
arr2_1d = rnp.root2array(load('single1.root'), branches='n_int')
assert_equal(arr1_1d.dtype, np.dtype('<i4'))
assert_equal(arr2_1d.dtype, np.dtype('<i4'))


def test_selection():
Expand Down

0 comments on commit d46075f

Please sign in to comment.