CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
Utilities.TestModuleCommand Class Reference
Inheritance diagram for Utilities.TestModuleCommand:

Public Member Functions

def setup
 
def testConfig
 

Detailed Description

Definition at line 29 of file Utilities.py.

Member Function Documentation

def Utilities.TestModuleCommand.setup (   self)

Definition at line 30 of file Utilities.py.

30 
31  def setup(self):
None
def Utilities.TestModuleCommand.testConfig (   self)

Definition at line 32 of file Utilities.py.

32 
33  def testConfig(self):
34  import FWCore.ParameterSet.Config as cms
35  process = cms.Process("Test")
36 
37  process.a = cms.EDProducer("A")
38  process.b = cms.EDProducer("B")
39  process.c = cms.EDProducer("C")
40 
41  process.p = cms.Path(process.b*process.c)
42 
43  process.d = cms.EDAnalyzer("D")
44 
45  process.o = cms.OutputModule("MyOutput")
46  process.out = cms.EndPath(process.o)
47  removeModulesNotOnAPathExcluding(process,(process.b,))
48 
49  self.assert_(not hasattr(process,'a'))
50  self.assert_(hasattr(process,'b'))
51  self.assert_(hasattr(process,'c'))
52  self.assert_(not hasattr(process,'d'))
53  self.assert_(hasattr(process,'o'))
unittest.main()
def removeModulesNotOnAPathExcluding
Definition: Utilities.py:1