CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions
SequenceVisitors.TestModuleCommand Class Reference
Inheritance diagram for SequenceVisitors.TestModuleCommand:

Public Member Functions

def setUp
 
def testValidators
 

Detailed Description

Definition at line 152 of file SequenceVisitors.py.

Member Function Documentation

def SequenceVisitors.TestModuleCommand.setUp (   self)
Nothing to do 

Definition at line 153 of file SequenceVisitors.py.

154  def setUp(self):
155  """Nothing to do """
pass
def SequenceVisitors.TestModuleCommand.testValidators (   self)

Definition at line 156 of file SequenceVisitors.py.

157  def testValidators(self):
158  producer = EDProducer("Producer")
159  analyzer = EDAnalyzer("Analyzer")
160  output = OutputModule("Out")
161  filter = EDFilter("Filter")
162  unlabeled = EDAnalyzer("UnLabeled")
163  producer.setLabel("producer")
164  analyzer.setLabel("analyzer")
165  output.setLabel("output")
166  filter.setLabel("filter")
167  s1 = Sequence(analyzer*producer)
168  s2 = Sequence(output+filter)
169  p1 = Path(s1)
170  p2 = Path(s1*s2)
171  p3 = Path(s1+unlabeled)
172  ep1 = EndPath(producer+output+analyzer)
173  ep2 = EndPath(filter+output)
174  ep3 = EndPath(s2)
175  ep4 = EndPath(unlabeled)
176  pathValidator = PathValidator()
177  endpathValidator = EndPathValidator()
178  p1.visit(pathValidator)
179  self.assertRaises(ValueError, p2.visit, pathValidator)
180  self.assertRaises(ValueError, p3.visit, pathValidator)
181  ep1.visit(endpathValidator)
182  ep2.visit(endpathValidator)
183  ep3.visit(endpathValidator)
184  self.assertRaises(ValueError, ep4.visit, endpathValidator)
185 
unittest.main()
tuple Path
Definition: mps_fire.py:298