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


Python Shading.create_zap_package方法代码示例

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


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

示例1: test_rules_file

# 需要导入模块: from pants.backend.jvm.subsystems.shader import Shading [as 别名]
# 或者: from pants.backend.jvm.subsystems.shader.Shading import create_zap_package [as 别名]
 def test_rules_file(self):
   expected = [
     'rule a.b.c.** [email protected]\n',
     'rule a.*.b [email protected]\n',
     'rule x.y.z.** [email protected]\n',
     'zap com.foo.bar.Main\n',
     'zap com.baz.*\n',
     'keep org.foobar.vegetable.Potato\n',
     'keep org.foobar.fruit.**\n',
   ]
   rules = [
     Shading.create_relocate('a.b.c.**', '[email protected]'),
     Shading.create_relocate('a.*.b', shade_prefix='shaded.'),
     Shading.create_relocate_package('x.y.z', shade_prefix='shaded.'),
     Shading.create_zap('com.foo.bar.Main'),
     Shading.create_zap_package('com.baz', recursive=False),
     Shading.create_keep('org.foobar.vegetable.Potato'),
     Shading.create_keep_package('org.foobar.fruit'),
   ]
   with self.shader.temporary_rules_file(rules) as fname:
     with open(fname, 'r') as f:
       received = f.readlines()
       self.assertEqual(received, expected)
开发者ID:CaitieM20,项目名称:pants,代码行数:25,代码来源:test_shader.py

示例2: test_rules_file

# 需要导入模块: from pants.backend.jvm.subsystems.shader import Shading [as 别名]
# 或者: from pants.backend.jvm.subsystems.shader.Shading import create_zap_package [as 别名]
 def test_rules_file(self):
     expected = [
         "rule a.b.c.** [email protected]\n",
         "rule a.*.b [email protected]\n",
         "rule x.y.z.** [email protected]\n",
         "zap com.foo.bar.Main\n",
         "zap com.baz.*\n",
         "keep org.foobar.vegetable.Potato\n",
         "keep org.foobar.fruit.**\n",
     ]
     rules = [
         Shading.create_relocate("a.b.c.**", "[email protected]"),
         Shading.create_relocate("a.*.b", shade_prefix="shaded."),
         Shading.create_relocate_package("x.y.z", shade_prefix="shaded."),
         Shading.create_zap("com.foo.bar.Main"),
         Shading.create_zap_package("com.baz", recursive=False),
         Shading.create_keep("org.foobar.vegetable.Potato"),
         Shading.create_keep_package("org.foobar.fruit"),
     ]
     with self.shader.temporary_rules_file(rules) as fname:
         with open(fname, "r") as f:
             received = f.readlines()
             self.assertEqual(received, expected)
开发者ID:ahamilton55,项目名称:pants,代码行数:25,代码来源:test_shader.py

示例3: test_zap_package

# 需要导入模块: from pants.backend.jvm.subsystems.shader import Shading [as 别名]
# 或者: from pants.backend.jvm.subsystems.shader.Shading import create_zap_package [as 别名]
 def test_zap_package(self):
   self.assertEqual(('zap', 'com.foo.bar.**'), Shading.create_zap_package('com.foo.bar', True))
   self.assertEqual(('zap', 'com.foo.bar.*'), Shading.create_zap_package('com.foo.bar', False))
开发者ID:CaitieM20,项目名称:pants,代码行数:5,代码来源:test_shader.py

示例4: test_zap_package

# 需要导入模块: from pants.backend.jvm.subsystems.shader import Shading [as 别名]
# 或者: from pants.backend.jvm.subsystems.shader.Shading import create_zap_package [as 别名]
 def test_zap_package(self):
     self.assertEqual(("zap", "com.foo.bar.**"), Shading.create_zap_package("com.foo.bar", True))
     self.assertEqual(("zap", "com.foo.bar.*"), Shading.create_zap_package("com.foo.bar", False))
开发者ID:ahamilton55,项目名称:pants,代码行数:5,代码来源:test_shader.py


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