本文整理汇总了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
示例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
示例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
示例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
示例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")
示例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")