當前位置: 首頁>>代碼示例>>Python>>正文


Python GenInfFile.GenPcdSections類代碼示例

本文整理匯總了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)
開發者ID:hsienchieh,項目名稱:uefilab,代碼行數:31,代碼來源:CommentGeneratingUnitTest.py

示例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)
開發者ID:Acidburn0zzz,項目名稱:buildtools-BaseTools,代碼行數:34,代碼來源:CommentGeneratingUnitTest.py

示例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)
開發者ID:hsienchieh,項目名稱:uefilab,代碼行數:17,代碼來源:CommentGeneratingUnitTest.py

示例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)
開發者ID:hsienchieh,項目名稱:uefilab,代碼行數:17,代碼來源:CommentGeneratingUnitTest.py

示例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)
開發者ID:Acidburn0zzz,項目名稱:buildtools-BaseTools,代碼行數:18,代碼來源:CommentGeneratingUnitTest.py

示例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)
開發者ID:Acidburn0zzz,項目名稱:buildtools-BaseTools,代碼行數:18,代碼來源:CommentGeneratingUnitTest.py

示例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)
開發者ID:Acidburn0zzz,項目名稱:buildtools-BaseTools,代碼行數:20,代碼來源:CommentGeneratingUnitTest.py


注:本文中的GenMetaFile.GenInfFile.GenPcdSections類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。