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

Member Function Documentation

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

Definition at line 109 of file SequenceVisitors.py.

References SequenceTypes.TestModuleCommand.setUp().

109  def setUp(self):
110  """Nothing to do """
111  pass
def SequenceVisitors.TestModuleCommand.testValidators (   self)

Definition at line 112 of file SequenceVisitors.py.

112  def testValidators(self):
113  producer = EDProducer("Producer")
114  analyzer = EDAnalyzer("Analyzer")
115  output = OutputModule("Out")
116  filter = EDFilter("Filter")
117  unlabeled = EDAnalyzer("UnLabeled")
118  producer.setLabel("producer")
119  analyzer.setLabel("analyzer")
120  output.setLabel("output")
121  filter.setLabel("filter")
122  s1 = Sequence(analyzer*producer)
123  s2 = Sequence(output+filter)
124  p1 = Path(s1)
125  p2 = Path(s1*s2)
126  p3 = Path(s1+unlabeled)
127  ep1 = EndPath(producer+output+analyzer)
128  ep2 = EndPath(filter+output)
129  ep3 = EndPath(s2)
130  ep4 = EndPath(unlabeled)
131  pathValidator = PathValidator()
132  endpathValidator = EndPathValidator()
133  p1.visit(pathValidator)
134  self.assertRaises(ValueError, p2.visit, pathValidator)
135  self.assertRaises(ValueError, p3.visit, pathValidator)
136  ep1.visit(endpathValidator)
137  ep2.visit(endpathValidator)
138  ep3.visit(endpathValidator)
139  self.assertRaises(ValueError, ep4.visit, endpathValidator)
140 
141  unittest.main()