本文整理汇总了Python中pants.backend.jvm.tasks.ivy_task_mixin.IvyResolveFingerprintStrategy类的典型用法代码示例。如果您正苦于以下问题:Python IvyResolveFingerprintStrategy类的具体用法?Python IvyResolveFingerprintStrategy怎么用?Python IvyResolveFingerprintStrategy使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了IvyResolveFingerprintStrategy类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_jvm_target_without_excludes_is_none
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))
示例2: test_target_target_is_none
def test_target_target_is_none(self):
confs = ()
strategy = IvyResolveFingerprintStrategy(confs)
target = self.make_target(':just-target')
self.assertIsNone(strategy.compute_fingerprint(target))
示例3: test_identical_jar_libraries_with_differing_managed_deps_differ
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))
示例4: test_jar_library_with_one_jar_is_hashed
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
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
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))