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


Python InstallManifest.add_required_exists方法代码示例

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


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

示例1: _get_test_manifest

# 需要导入模块: from mozpack.manifests import InstallManifest [as 别名]
# 或者: from mozpack.manifests.InstallManifest import add_required_exists [as 别名]
    def _get_test_manifest(self):
        m = InstallManifest()
        m.add_symlink(self.tmppath("s_source"), "s_dest")
        m.add_copy(self.tmppath("c_source"), "c_dest")
        m.add_required_exists("e_dest")

        return m
开发者ID:matyapiro31,项目名称:instantbird-1.5,代码行数:9,代码来源:test_manifests.py

示例2: _get_test_manifest

# 需要导入模块: from mozpack.manifests import InstallManifest [as 别名]
# 或者: from mozpack.manifests.InstallManifest import add_required_exists [as 别名]
    def _get_test_manifest(self):
        m = InstallManifest()
        m.add_symlink(self.tmppath('s_source'), 's_dest')
        m.add_copy(self.tmppath('c_source'), 'c_dest')
        m.add_required_exists('e_dest')
        m.add_optional_exists('o_dest')

        return m
开发者ID:at13,项目名称:mozilla-central,代码行数:10,代码来源:test_manifests.py

示例3: _get_test_manifest

# 需要导入模块: from mozpack.manifests import InstallManifest [as 别名]
# 或者: from mozpack.manifests.InstallManifest import add_required_exists [as 别名]
    def _get_test_manifest(self):
        m = InstallManifest()
        m.add_symlink(self.tmppath('s_source'), 's_dest')
        m.add_copy(self.tmppath('c_source'), 'c_dest')
        m.add_preprocess(self.tmppath('p_source'), 'p_dest', self.tmppath('p_source.pp'), '#', {'FOO':'BAR', 'BAZ':'QUX'})
        m.add_required_exists('e_dest')
        m.add_optional_exists('o_dest')
        m.add_pattern_symlink('ps_base', '*', 'ps_dest')
        m.add_pattern_copy('pc_base', '**', 'pc_dest')

        return m
开发者ID:JuannyWang,项目名称:gecko-dev,代码行数:13,代码来源:test_manifests.py

示例4: _get_test_manifest

# 需要导入模块: from mozpack.manifests import InstallManifest [as 别名]
# 或者: from mozpack.manifests.InstallManifest import add_required_exists [as 别名]
    def _get_test_manifest(self):
        m = InstallManifest()
        m.add_symlink(self.tmppath("s_source"), "s_dest")
        m.add_copy(self.tmppath("c_source"), "c_dest")
        m.add_preprocess(
            self.tmppath("p_source"), "p_dest", self.tmppath("p_source.pp"), "#", {"FOO": "BAR", "BAZ": "QUX"}
        )
        m.add_required_exists("e_dest")
        m.add_optional_exists("o_dest")
        m.add_pattern_symlink("ps_base", "*", "ps_dest")
        m.add_pattern_copy("pc_base", "**", "pc_dest")

        return m
开发者ID:weinrank,项目名称:gecko-dev,代码行数:15,代码来源:test_manifests.py

示例5: test_adds

# 需要导入模块: from mozpack.manifests import InstallManifest [as 别名]
# 或者: from mozpack.manifests.InstallManifest import add_required_exists [as 别名]
    def test_adds(self):
        m = InstallManifest()
        m.add_symlink("s_source", "s_dest")
        m.add_copy("c_source", "c_dest")
        m.add_required_exists("e_dest")

        self.assertEqual(len(m), 3)
        self.assertIn("s_dest", m)
        self.assertIn("c_dest", m)
        self.assertIn("e_dest", m)

        with self.assertRaises(ValueError):
            m.add_symlink("s_other", "s_dest")

        with self.assertRaises(ValueError):
            m.add_copy("c_other", "c_dest")

        with self.assertRaises(ValueError):
            m.add_required_exists("e_dest")
开发者ID:matyapiro31,项目名称:instantbird-1.5,代码行数:21,代码来源:test_manifests.py

示例6: test_adds

# 需要导入模块: from mozpack.manifests import InstallManifest [as 别名]
# 或者: from mozpack.manifests.InstallManifest import add_required_exists [as 别名]
    def test_adds(self):
        m = InstallManifest()
        m.add_symlink("s_source", "s_dest")
        m.add_copy("c_source", "c_dest")
        m.add_required_exists("e_dest")
        m.add_optional_exists("o_dest")
        m.add_pattern_symlink("ps_base", "ps/*", "ps_dest")
        m.add_pattern_copy("pc_base", "pc/**", "pc_dest")
        m.add_preprocess("p_source", "p_dest", "p_source.pp")

        self.assertEqual(len(m), 7)
        self.assertIn("s_dest", m)
        self.assertIn("c_dest", m)
        self.assertIn("p_dest", m)
        self.assertIn("e_dest", m)
        self.assertIn("o_dest", m)

        with self.assertRaises(ValueError):
            m.add_symlink("s_other", "s_dest")

        with self.assertRaises(ValueError):
            m.add_copy("c_other", "c_dest")

        with self.assertRaises(ValueError):
            m.add_preprocess("p_other", "p_dest", "p_other.pp")

        with self.assertRaises(ValueError):
            m.add_required_exists("e_dest")

        with self.assertRaises(ValueError):
            m.add_optional_exists("o_dest")

        with self.assertRaises(ValueError):
            m.add_pattern_symlink("ps_base", "ps/*", "ps_dest")

        with self.assertRaises(ValueError):
            m.add_pattern_copy("pc_base", "pc/**", "pc_dest")
开发者ID:weinrank,项目名称:gecko-dev,代码行数:39,代码来源:test_manifests.py


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