HPS-MC
test_tools_lhecount.py
Go to the documentation of this file.
1
import
unittest
2
3
from
hpsmc.tools
import
LHECount
4
5
6
class
TestLHECount
(unittest.TestCase):
7
8
def
test_init
(self):
9
lhe_count =
LHECount
(minevents=10)
10
self.assertEqual(lhe_count.name,
"lhe_count"
)
11
self.assertEqual(lhe_count.minevents, 10)
12
13
def
test_setup_no_inputs
(self):
14
lhe_count =
LHECount
()
15
self.assertRaises(Exception,
lambda
: lhe_count.setup(),
"Missing at least one input file."
)
16
17
18
if
__name__ ==
'__main__'
:
19
unittest.main()
hpsmc.tools.LHECount
Count events in an LHE file.
Definition:
tools.py:1308
test.test_tools_lhecount.TestLHECount
Definition:
test_tools_lhecount.py:6
test.test_tools_lhecount.TestLHECount.test_setup_no_inputs
def test_setup_no_inputs(self)
Definition:
test_tools_lhecount.py:13
test.test_tools_lhecount.TestLHECount.test_init
def test_init(self)
Definition:
test_tools_lhecount.py:8
hpsmc.tools
Tools that can be used in HPSMC jobs.
Definition:
tools.py:1
python
test
test_tools_lhecount.py
Generated by
1.9.1