当前位置: 首页>>代码示例>>Python>>正文


Python XcodeProject.add_project方法代码示例

本文整理汇总了Python中pbxproj.XcodeProject.add_project方法的典型用法代码示例。如果您正苦于以下问题:Python XcodeProject.add_project方法的具体用法?Python XcodeProject.add_project怎么用?Python XcodeProject.add_project使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pbxproj.XcodeProject的用法示例。


在下文中一共展示了XcodeProject.add_project方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: testAddProjectNotForced

# 需要导入模块: from pbxproj import XcodeProject [as 别名]
# 或者: from pbxproj.XcodeProject import add_project [as 别名]
    def testAddProjectNotForced(self):
        project = XcodeProject(self.obj)

        _ = project.add_project('samplescli/dependency.xcodeproj', file_options=FileOptions(create_build_files=False))
        reference_proxies = project.add_project('samplescli/dependency.xcodeproj', force=False,
                                                file_options=FileOptions(create_build_files=False))

        self.assertListEqual(reference_proxies, [])
开发者ID:kronenthaler,项目名称:mod-pbxproj,代码行数:10,代码来源:TestProjectFiles.py

示例2: testAddProjectWithoutBuildPhases

# 需要导入模块: from pbxproj import XcodeProject [as 别名]
# 或者: from pbxproj.XcodeProject import add_project [as 别名]
    def testAddProjectWithoutBuildPhases(self):
        project = XcodeProject(self.obj)

        frameworks = project.objects.get_objects_in_section('PBXFrameworksBuildPhase').__len__()
        resources = project.objects.get_objects_in_section('PBXResourcesBuildPhase').__len__()
        build_files = project.objects.get_objects_in_section('PBXBuildFile').__len__()

        reference_proxies = project.add_project('samplescli/dependency.xcodeproj', file_options=FileOptions(create_build_files=False))

        self.assertEqual(reference_proxies.__len__(), 2)
        self.assertEqual(project.objects.get_objects_in_section(u'PBXContainerItemProxy').__len__(), 2)
        self.assertEqual(project.objects.get_objects_in_section(u'PBXReferenceProxy').__len__(), 2)
        self.assertEqual(project.objects.get_objects_in_section(u'PBXProject')[0].projectReferences.__len__(), 1)

        # check that the buildFiles where added
        self.assertEqual(project.objects.get_objects_in_section('PBXBuildFile').__len__(), build_files)
        self.assertEqual(project.objects.get_objects_in_section('PBXFrameworksBuildPhase').__len__(), frameworks)
        self.assertEqual(project.objects.get_objects_in_section('PBXResourcesBuildPhase').__len__(), resources)
开发者ID:kronenthaler,项目名称:mod-pbxproj,代码行数:20,代码来源:TestProjectFiles.py

示例3: testAddProjectDoesntExists

# 需要导入模块: from pbxproj import XcodeProject [as 别名]
# 或者: from pbxproj.XcodeProject import add_project [as 别名]
    def testAddProjectDoesntExists(self):
        project = XcodeProject(self.obj)
        reference_proxies = project.add_project(os.path.abspath("samples/unexistingFile.m"))

        # nothing to do if the file is absolute but doesn't exist
        self.assertIsNone(reference_proxies)
开发者ID:kronenthaler,项目名称:mod-pbxproj,代码行数:8,代码来源:TestProjectFiles.py


注:本文中的pbxproj.XcodeProject.add_project方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。