CMS 3D CMS Logo

List of all members | Public Member Functions
SequenceVisitors.TestModuleCommand Class Reference
Inheritance diagram for SequenceVisitors.TestModuleCommand:

Public Member Functions

def setUp (self)
 
def testValidators (self)
 

Detailed Description

Definition at line 157 of file SequenceVisitors.py.

Member Function Documentation

◆ setUp()

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

Definition at line 158 of file SequenceVisitors.py.

References SequenceTypes.TestModuleCommand.setUp().

158  def setUp(self):
159  """Nothing to do """
160  pass

◆ testValidators()

def SequenceVisitors.TestModuleCommand.testValidators (   self)

Definition at line 161 of file SequenceVisitors.py.

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