本文整理匯總了Python中GenMetaFile.GenInfFile.GenPcdSections類的典型用法代碼示例。如果您正苦於以下問題:Python GenPcdSections類的具體用法?Python GenPcdSections怎麽用?Python GenPcdSections使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了GenPcdSections類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: testNormalCase7
def testNormalCase7(self):
ObjectList = []
ItemType = "Pcd"
TSCName = "TSCName"
CName = "CName"
DValue = "DValue"
FFE = "FFE"
Usage = "UNDEFINED"
Str = "commment line 1\ncomment line 2"
Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE, Usage, Str)
ObjectList.append(Object)
Usage = "CONSUMES"
Str = "Foo"
Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE, Usage, Str)
ObjectList.append(Object)
Usage = "UNDEFINED"
Str = "commment line 3"
Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE, Usage, Str)
ObjectList.append(Object)
Result = GenPcdSections(ObjectList)
Expected = """[Pcd]
# commment line 1
# comment line 2
## CONSUMES # Foo
# commment line 3
TSCName.CName|DValue|FFE"""
self.assertEqual(Result.strip(), Expected)
示例2: testNormalCase7
def testNormalCase7(self):
ObjectList = []
ItemType = 'Pcd'
TSCName = 'TSCName'
CName = 'CName'
DValue = 'DValue'
FFE = 'FFE'
Usage = 'UNDEFINED'
Str = 'commment line 1\ncomment line 2'
Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE,
Usage, Str)
ObjectList.append(Object)
Usage = 'CONSUMES'
Str = 'Foo'
Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE,
Usage, Str)
ObjectList.append(Object)
Usage = 'UNDEFINED'
Str = 'commment line 3'
Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE,
Usage, Str)
ObjectList.append(Object)
Result = GenPcdSections(ObjectList)
Expected = '''[Pcd]
# commment line 1
# comment line 2
## CONSUMES # Foo
# commment line 3
TSCName.CName|DValue|FFE'''
self.assertEqual(Result.strip(), Expected)
示例3: testNormalCase9
def testNormalCase9(self):
ObjectList = []
ItemType = TAB_INF_FEATURE_PCD
TSCName = "TSCName"
CName = "CName"
DValue = "DValue"
FFE = "FFE"
Usage = "CONSUMES"
Str = ""
Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE, Usage, Str)
ObjectList.append(Object)
Result = GenPcdSections(ObjectList)
Expected = """[FeaturePcd]
TSCName.CName|DValue|FFE"""
self.assertEqual(Result.strip(), Expected)
示例4: testNormalCase4
def testNormalCase4(self):
ObjectList = []
ItemType = "Pcd"
TSCName = "TSCName"
CName = "CName"
DValue = "DValue"
FFE = "FFE"
Usage = "CONSUMES"
Str = ""
Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE, Usage, Str)
ObjectList.append(Object)
Result = GenPcdSections(ObjectList)
Expected = "[Pcd]\nTSCName.CName|DValue|FFE ## CONSUMES"
self.assertEqual(Result.strip(), Expected)
示例5: testNormalCase4
def testNormalCase4(self):
ObjectList = []
ItemType = 'Pcd'
TSCName = 'TSCName'
CName = 'CName'
DValue = 'DValue'
FFE = 'FFE'
Usage = 'CONSUMES'
Str = ''
Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE,
Usage, Str)
ObjectList.append(Object)
Result = GenPcdSections(ObjectList)
Expected = '[Pcd]\nTSCName.CName|DValue|FFE ## CONSUMES'
self.assertEqual(Result.strip(), Expected)
示例6: testNormalCase9
def testNormalCase9(self):
ObjectList = []
ItemType = TAB_INF_FEATURE_PCD
TSCName = 'TSCName'
CName = 'CName'
DValue = 'DValue'
FFE = 'FFE'
Usage = 'CONSUMES'
Str = ''
Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE,
Usage, Str)
ObjectList.append(Object)
Result = GenPcdSections(ObjectList)
Expected = '''[FeaturePcd]
TSCName.CName|DValue|FFE'''
self.assertEqual(Result.strip(), Expected)
示例7: testNormalCase1
def testNormalCase1(self):
ObjectList = []
ItemType = 'Pcd'
TSCName = 'TSCName'
CName = 'CName'
DValue = 'DValue'
FFE = 'FFE'
Usage = 'UNDEFINED'
Str = 'Help'
Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE,
Usage, Str)
ObjectList.append(Object)
Result = GenPcdSections(ObjectList)
Expected = \
'[Pcd]\n' + \
'TSCName.CName|DValue|FFE # Help'
self.assertEqual(Result.strip(), Expected)