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

Member Function Documentation

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

Definition at line 122 of file SequenceVisitors.py.

References SequenceTypes.TestModuleCommand.setUp().

122  def setUp(self):
123  """Nothing to do """
124  pass
def SequenceVisitors.TestModuleCommand.testValidators (   self)

Definition at line 125 of file SequenceVisitors.py.

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