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

Member Function Documentation

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

Definition at line 123 of file SequenceVisitors.py.

References SequenceTypes.TestModuleCommand.setUp().

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

Definition at line 126 of file SequenceVisitors.py.

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