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 
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()
Count events in an LHE file.
Definition: tools.py:1308
Tools that can be used in HPSMC jobs.
Definition: tools.py:1