304 process = cms.Process(
"TEST")
305 process.a = cms.EDProducer(
"AProd")
306 process.b = cms.EDProducer(
"BProd")
307 process.c = cms.EDProducer(
"CProd")
308 process.d = cms.EDProducer(
"DProd",
309 par1 = cms.InputTag(
"f1"))
310 process.e = cms.EDProducer(
"EProd",
311 par1 = cms.VInputTag(cms.InputTag(
"x"), cms.InputTag(
"f1",
"y")))
312 process.f = cms.EDProducer(
"FProd",
313 par1 = cms.VInputTag(
"x",
"y",
"f1"))
314 process.g = cms.EDProducer(
"GProd",
315 par1 = cms.InputTag(
"f"))
316 process.f1 = cms.EDFilter(
"Filter")
317 process.f2 = cms.EDFilter(
"Filter2")
318 process.f3 = cms.EDFilter(
"Filter3")
319 process.p1 = cms.Path(process.a+process.b+process.f1+process.d+process.e+process.f+process.g)
320 process.p4 = cms.Path(process.a+process.f2+process.b+process.f1)
321 process.p2 = cms.Path(process.a+process.b)
322 process.p3 = cms.Path(process.f1)
323 process.schedule = cms.Schedule(process.p1,process.p4,process.p2,process.p3)
325 self.assertEqual(process.options.allowUnscheduled,cms.untracked.bool(
True))
326 self.assert_(hasattr(process,
'p2'))
327 self.assert_(hasattr(process,
'a'))
328 self.assert_(hasattr(process,
'b'))
329 self.assert_(
not hasattr(process,
'c'))
330 self.assert_(hasattr(process,
'd'))
331 self.assert_(hasattr(process,
'e'))
332 self.assert_(hasattr(process,
'f'))
333 self.assert_(hasattr(process,
'g'))
334 self.assert_(hasattr(process,
'f1'))
335 self.assert_(hasattr(process,
'f2'))
336 self.assert_(
not hasattr(process,
'f3'))
337 self.assertEqual(process.p1.dumpPython(
None),
'cms.Path(process.f1+process.d+process.e+process.f+process.g)\n')
338 self.assertEqual(process.p2.dumpPython(
None),
'cms.Path()\n')
339 self.assertEqual(process.p3.dumpPython(
None),
'cms.Path(process.f1)\n')
340 self.assertEqual(process.p4.dumpPython(
None),
'cms.Path(process.f2+process.f1)\n')
341 self.assertEqual([p
for p
in process.schedule],[process.p1,process.p4,process.p2,process.p3])
unittest.main()