test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
PhysicsTools
HeppyCore
python
framework
eventstfile_test.py
Go to the documentation of this file.
1
import
unittest
2
3
from
eventstfile
import
Events
4
from
PhysicsTools.HeppyCore.utils.testtree
import
create_tree
5
6
testfname =
'test_tree.root'
7
8
class
EventsTFileTestCase
(unittest.TestCase):
9
10
def
test
(self):
11
events =
Events
(testfname,
'test_tree'
)
12
event = events.to(2)
13
for
iev, ev
in
enumerate(events):
14
self.assertEqual(iev, ev.var1)
15
16
if
__name__ ==
'__main__'
:
17
create_tree
(testfname)
18
unittest.main()
eventstfile_test.EventsTFileTestCase.test
def test
Definition:
eventstfile_test.py:10
eventstfile_test.EventsTFileTestCase
Definition:
eventstfile_test.py:8
testtree.create_tree
def create_tree
Definition:
testtree.py:4
eventstfile.Events
Definition:
eventstfile.py:6
Generated for CMSSW Reference Manual by
1.8.5