Skip to content
Snippets Groups Projects
Commit 55a1e607 authored by Enric Tejedor Saavedra's avatar Enric Tejedor Saavedra
Browse files

[Exp PyROOT] Add test for len of a TVectorT

parent b32fdd2f
No related branches found
No related tags found
Loading
......@@ -46,6 +46,9 @@ ROOT_ADD_PYUNITTEST(pyroot_pyz_tclonesarray_itemaccess tclonesarray_itemaccess.p
# TArray and subclasses pythonizations
ROOT_ADD_PYUNITTEST(pyroot_pyz_tarray_len tarray_len.py)
# TVectorT pythonisations
ROOT_ADD_PYUNITTEST(pyroot_pyz_tvectort_len tvectort_len.py)
# TString pythonisations
ROOT_ADD_PYUNITTEST(pyroot_pyz_tstring_len tstring_len.py)
ROOT_ADD_PYUNITTEST(pyroot_pyz_tstring_str_repr tstring_str_repr.py)
......
import unittest
import ROOT
class TVectorTLen(unittest.TestCase):
"""
Test for the pythonization that allows to get the size of a
TVectorT by calling `len` on it.
"""
num_elems = 3
# Tests
def test_len(self):
v = ROOT.TVectorT[float](self.num_elems)
self.assertEqual(len(v), self.num_elems)
if __name__ == '__main__':
unittest.main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment