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 123 of file SequenceVisitors.py.

Member Function Documentation

◆ setUp()

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

Definition at line 124 of file SequenceVisitors.py.

124  def setUp(self):
125  """Nothing to do """
126  pass

References SequenceTypes.TestModuleCommand.setUp().

◆ testValidators()

def SequenceVisitors.TestModuleCommand.testValidators (   self)

Definition at line 127 of file SequenceVisitors.py.

127  def testValidators(self):
128  producer = EDProducer("Producer")
129  analyzer = EDAnalyzer("Analyzer")
130  output = OutputModule("Out")
131  filter = EDFilter("Filter")
132  unlabeled = EDAnalyzer("UnLabeled")
133  producer.setLabel("producer")
134  analyzer.setLabel("analyzer")
135  output.setLabel("output")
136  filter.setLabel("filter")
137  s1 = Sequence(analyzer*producer)
138  s2 = Sequence(output+filter)
139  p1 = Path(s1)
140  p2 = Path(s1*s2)
141  p3 = Path(s1+unlabeled)
142  ep1 = EndPath(producer+output+analyzer)
143  ep2 = EndPath(filter+output)
144  ep3 = EndPath(s2)
145  ep4 = EndPath(unlabeled)
146  pathValidator = PathValidator()
147  endpathValidator = EndPathValidator()
148  p1.visit(pathValidator)
149  self.assertRaises(ValueError, p2.visit, pathValidator)
150  self.assertRaises(ValueError, p3.visit, pathValidator)
151  ep1.visit(endpathValidator)
152  ep2.visit(endpathValidator)
153  ep3.visit(endpathValidator)
154  self.assertRaises(ValueError, ep4.visit, endpathValidator)
155 
156  unittest.main()
mps_fire.Path
Path
Definition: mps_fire.py:298
cmsswSequenceInfo.Sequence
Sequence
Definition: cmsswSequenceInfo.py:14