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