Public Member Functions | |
def | setUp |
def | testValidators |
Definition at line 40 of file SequenceVisitors.py.
def SequenceVisitors::TestModuleCommand::setUp | ( | self | ) |
Nothing to do
Definition at line 41 of file SequenceVisitors.py.
def SequenceVisitors::TestModuleCommand::testValidators | ( | self | ) |
Definition at line 44 of file SequenceVisitors.py.
00045 : 00046 producer = EDProducer("Producer") 00047 analyzer = EDAnalyzer("Analyzer") 00048 output = OutputModule("Out") 00049 filter = EDFilter("Filter") 00050 unlabeled = EDAnalyzer("UnLabeled") 00051 producer.setLabel("producer") 00052 analyzer.setLabel("analyzer") 00053 output.setLabel("output") 00054 filter.setLabel("filter") 00055 s1 = Sequence(analyzer*producer) 00056 s2 = Sequence(output+filter) 00057 p1 = Path(s1) 00058 p2 = Path(s1*s2) 00059 p3 = Path(s1+unlabeled) 00060 ep1 = EndPath(producer+output+analyzer) 00061 ep2 = EndPath(filter+output) 00062 ep3 = EndPath(s2) 00063 ep4 = EndPath(unlabeled) 00064 pathValidator = PathValidator() 00065 endpathValidator = EndPathValidator() 00066 p1.visit(pathValidator) 00067 self.assertRaises(ValueError, p2.visit, pathValidator) 00068 self.assertRaises(ValueError, p3.visit, pathValidator) 00069 ep1.visit(endpathValidator) 00070 ep2.visit(endpathValidator) 00071 ep3.visit(endpathValidator) 00072 self.assertRaises(ValueError, ep4.visit, endpathValidator) 00073 unittest.main()