本文整理汇总了Python中pants.backend.jvm.tasks.ivy_task_mixin.IvyResolveFingerprintStrategy.compute_fingerprint方法的典型用法代码示例。如果您正苦于以下问题:Python IvyResolveFingerprintStrategy.compute_fingerprint方法的具体用法?Python IvyResolveFingerprintStrategy.compute_fingerprint怎么用?Python IvyResolveFingerprintStrategy.compute_fingerprint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pants.backend.jvm.tasks.ivy_task_mixin.IvyResolveFingerprintStrategy
的用法示例。
在下文中一共展示了IvyResolveFingerprintStrategy.compute_fingerprint方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_identical_jar_libraries_with_differing_managed_deps_differ
# 需要导入模块: from pants.backend.jvm.tasks.ivy_task_mixin import IvyResolveFingerprintStrategy [as 别名]
# 或者: from pants.backend.jvm.tasks.ivy_task_mixin.IvyResolveFingerprintStrategy import compute_fingerprint [as 别名]
def test_identical_jar_libraries_with_differing_managed_deps_differ(self):
confs = ()
strategy = IvyResolveFingerprintStrategy(
self.create_task(self.context()), confs)
managed_jar_deps = self.make_target(
':managed',
target_type=ManagedJarDependencies,
artifacts=[JarDependency('org.some', 'name')])
self.set_artifact_set_for(managed_jar_deps, PinnedJarArtifactSet())
jar_lib_with_managed_deps = self.make_target(
':jar-lib-1',
target_type=JarLibrary,
jars=[JarDependency('org.some', 'name')],
managed_dependencies=':managed')
jar_lib_without_managed_deps = self.make_target(
':jar-lib-no-managed-dep',
target_type=JarLibrary,
jars=[JarDependency('org.some', 'name')])
self.assertNotEqual(
strategy.compute_fingerprint(jar_lib_with_managed_deps),
strategy.compute_fingerprint(jar_lib_without_managed_deps))
示例2: test_jvm_target_without_excludes_is_none
# 需要导入模块: from pants.backend.jvm.tasks.ivy_task_mixin import IvyResolveFingerprintStrategy [as 别名]
# 或者: from pants.backend.jvm.tasks.ivy_task_mixin.IvyResolveFingerprintStrategy import compute_fingerprint [as 别名]
def test_jvm_target_without_excludes_is_none(self):
confs = ()
strategy = IvyResolveFingerprintStrategy(confs)
target_without_excludes = self.make_target(':jvm-target', target_type=JvmTarget)
self.assertIsNone(strategy.compute_fingerprint(target_without_excludes))
示例3: test_target_target_is_none
# 需要导入模块: from pants.backend.jvm.tasks.ivy_task_mixin import IvyResolveFingerprintStrategy [as 别名]
# 或者: from pants.backend.jvm.tasks.ivy_task_mixin.IvyResolveFingerprintStrategy import compute_fingerprint [as 别名]
def test_target_target_is_none(self):
confs = ()
strategy = IvyResolveFingerprintStrategy(confs)
target = self.make_target(':just-target')
self.assertIsNone(strategy.compute_fingerprint(target))
示例4: test_jar_library_with_one_jar_is_hashed
# 需要导入模块: from pants.backend.jvm.tasks.ivy_task_mixin import IvyResolveFingerprintStrategy [as 别名]
# 或者: from pants.backend.jvm.tasks.ivy_task_mixin.IvyResolveFingerprintStrategy import compute_fingerprint [as 别名]
def test_jar_library_with_one_jar_is_hashed(self):
confs = ()
strategy = IvyResolveFingerprintStrategy(confs)
jar_library = self.make_target(':jar-library', target_type=JarLibrary,
jars=[JarDependency('org.some', 'name')])
self.assertIsNotNone(strategy.compute_fingerprint(jar_library))
示例5: test_jvm_target_with_excludes_is_hashed
# 需要导入模块: from pants.backend.jvm.tasks.ivy_task_mixin import IvyResolveFingerprintStrategy [as 别名]
# 或者: from pants.backend.jvm.tasks.ivy_task_mixin.IvyResolveFingerprintStrategy import compute_fingerprint [as 别名]
def test_jvm_target_with_excludes_is_hashed(self):
confs = ()
strategy = IvyResolveFingerprintStrategy(confs)
target_with_excludes = self.make_target(':jvm-target', target_type=JvmTarget,
excludes=[Exclude('org.some')])
self.assertIsNotNone(strategy.compute_fingerprint(target_with_excludes))
示例6: test_identical_jar_libraries_with_same_jar_dep_management_artifacts_match
# 需要导入模块: from pants.backend.jvm.tasks.ivy_task_mixin import IvyResolveFingerprintStrategy [as 别名]
# 或者: from pants.backend.jvm.tasks.ivy_task_mixin.IvyResolveFingerprintStrategy import compute_fingerprint [as 别名]
def test_identical_jar_libraries_with_same_jar_dep_management_artifacts_match(self):
confs = ()
strategy = IvyResolveFingerprintStrategy(confs)
managed_jar_deps = self.make_target(':managed', target_type=ManagedJarDependencies,
artifacts=[JarDependency('org.some', 'name')])
self.set_artifact_set_for(managed_jar_deps, PinnedJarArtifactSet())
jar_lib_1 = self.make_target(':jar-lib-1', target_type=JarLibrary,
jars=[JarDependency('org.some', 'name')],
managed_dependencies=':managed')
jar_lib_2 = self.make_target(':jar-lib-2', target_type=JarLibrary,
jars=[JarDependency('org.some', 'name')],
managed_dependencies=':managed')
self.assertEqual(strategy.compute_fingerprint(jar_lib_1),
strategy.compute_fingerprint(jar_lib_2))