本文整理汇总了Python中configuration.Configuration.multiVersionGAs方法的典型用法代码示例。如果您正苦于以下问题:Python Configuration.multiVersionGAs方法的具体用法?Python Configuration.multiVersionGAs怎么用?Python Configuration.multiVersionGAs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类configuration.Configuration
的用法示例。
在下文中一共展示了Configuration.multiVersionGAs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_filter_multiple_versions
# 需要导入模块: from configuration import Configuration [as 别名]
# 或者: from configuration.Configuration import multiVersionGAs [as 别名]
def test_filter_multiple_versions(self):
config = Configuration()
config.singleVersion = True
alf = Filter(config)
al = copy.deepcopy(self.artifactList)
self.assertTrue('1.0.0' in al['com.google.guava:guava:pom']['1'])
self.assertTrue('1.0.1' in al['com.google.guava:guava:pom']['1'])
self.assertTrue('1.1.0' in al['com.google.guava:guava:pom']['1'])
self.assertTrue('2' in al['com.google.guava:guava:pom'])
self.assertTrue('3' in al['com.google.guava:guava:pom'])
self.assertTrue('1.0.0' in al['org.jboss:jboss-foo:jar']['1'])
self.assertTrue('1.0.1' in al['org.jboss:jboss-foo:jar']['1'])
self.assertTrue('1.1.0' in al['org.jboss:jboss-foo:jar']['1'])
self.assertTrue('2' in al['org.jboss:jboss-foo:jar'])
alf._filterMultipleVersions(al)
self.assertFalse('1.0.0' in al['com.google.guava:guava:pom']['1'])
self.assertFalse('1.0.1' in al['com.google.guava:guava:pom']['1'])
self.assertTrue('1.1.0' in al['com.google.guava:guava:pom']['1'])
self.assertFalse('2' in al['com.google.guava:guava:pom'])
self.assertFalse('3' in al['com.google.guava:guava:pom'])
self.assertFalse('1.0.0' in al['org.jboss:jboss-foo:jar']['1'])
self.assertFalse('1.0.1' in al['org.jboss:jboss-foo:jar']['1'])
self.assertTrue('1.1.0' in al['org.jboss:jboss-foo:jar']['1'])
self.assertFalse('2' in al['org.jboss:jboss-foo:jar'])
config.multiVersionGAs = ["com.google.guava:guava"]
al = copy.deepcopy(self.artifactList)
self.assertTrue('1.0.0' in al['com.google.guava:guava:pom']['1'])
self.assertTrue('1.0.1' in al['com.google.guava:guava:pom']['1'])
self.assertTrue('1.1.0' in al['com.google.guava:guava:pom']['1'])
self.assertTrue('2' in al['com.google.guava:guava:pom'])
self.assertTrue('3' in al['com.google.guava:guava:pom'])
self.assertTrue('1.0.0' in al['org.jboss:jboss-foo:jar']['1'])
self.assertTrue('1.0.1' in al['org.jboss:jboss-foo:jar']['1'])
self.assertTrue('1.1.0' in al['org.jboss:jboss-foo:jar']['1'])
self.assertTrue('2' in al['org.jboss:jboss-foo:jar'])
alf._filterMultipleVersions(al)
self.assertTrue('1.0.0' in al['com.google.guava:guava:pom']['1'])
self.assertTrue('1.0.1' in al['com.google.guava:guava:pom']['1'])
self.assertTrue('1.1.0' in al['com.google.guava:guava:pom']['1'])
self.assertTrue('2' in al['com.google.guava:guava:pom'])
self.assertTrue('3' in al['com.google.guava:guava:pom'])
self.assertFalse('1.0.0' in al['org.jboss:jboss-foo:jar']['1'])
self.assertFalse('1.0.1' in al['org.jboss:jboss-foo:jar']['1'])
self.assertTrue('1.1.0' in al['org.jboss:jboss-foo:jar']['1'])
self.assertFalse('2' in al['org.jboss:jboss-foo:jar'])
config.multiVersionGAs = ["*:jboss-foo"]
al = copy.deepcopy(self.artifactList)
self.assertTrue('1.0.0' in al['com.google.guava:guava:pom']['1'])
self.assertTrue('1.0.1' in al['com.google.guava:guava:pom']['1'])
self.assertTrue('1.1.0' in al['com.google.guava:guava:pom']['1'])
self.assertTrue('2' in al['com.google.guava:guava:pom'])
self.assertTrue('3' in al['com.google.guava:guava:pom'])
self.assertTrue('1.0.0' in al['org.jboss:jboss-foo:jar']['1'])
self.assertTrue('1.0.1' in al['org.jboss:jboss-foo:jar']['1'])
self.assertTrue('1.1.0' in al['org.jboss:jboss-foo:jar']['1'])
self.assertTrue('2' in al['org.jboss:jboss-foo:jar'])
alf._filterMultipleVersions(al)
self.assertFalse('1.0.0' in al['com.google.guava:guava:pom']['1'])
self.assertFalse('1.0.1' in al['com.google.guava:guava:pom']['1'])
self.assertTrue('1.1.0' in al['com.google.guava:guava:pom']['1'])
self.assertFalse('2' in al['com.google.guava:guava:pom'])
self.assertFalse('3' in al['com.google.guava:guava:pom'])
self.assertTrue('1.0.0' in al['org.jboss:jboss-foo:jar']['1'])
self.assertTrue('1.0.1' in al['org.jboss:jboss-foo:jar']['1'])
self.assertTrue('1.1.0' in al['org.jboss:jboss-foo:jar']['1'])
self.assertTrue('2' in al['org.jboss:jboss-foo:jar'])
config.multiVersionGAs = ["r/.*:jboss-foo/"]
al = copy.deepcopy(self.artifactList)
self.assertTrue('1.0.0' in al['com.google.guava:guava:pom']['1'])
self.assertTrue('1.0.1' in al['com.google.guava:guava:pom']['1'])
self.assertTrue('1.1.0' in al['com.google.guava:guava:pom']['1'])
self.assertTrue('2' in al['com.google.guava:guava:pom'])
self.assertTrue('3' in al['com.google.guava:guava:pom'])
self.assertTrue('1.0.0' in al['org.jboss:jboss-foo:jar']['1'])
self.assertTrue('1.0.1' in al['org.jboss:jboss-foo:jar']['1'])
self.assertTrue('1.1.0' in al['org.jboss:jboss-foo:jar']['1'])
self.assertTrue('2' in al['org.jboss:jboss-foo:jar'])
alf._filterMultipleVersions(al)
self.assertFalse('1.0.0' in al['com.google.guava:guava:pom']['1'])
self.assertFalse('1.0.1' in al['com.google.guava:guava:pom']['1'])
self.assertTrue('1.1.0' in al['com.google.guava:guava:pom']['1'])
self.assertFalse('2' in al['com.google.guava:guava:pom'])
self.assertFalse('3' in al['com.google.guava:guava:pom'])
self.assertTrue('1.0.0' in al['org.jboss:jboss-foo:jar']['1'])
self.assertTrue('1.0.1' in al['org.jboss:jboss-foo:jar']['1'])
self.assertTrue('1.1.0' in al['org.jboss:jboss-foo:jar']['1'])
self.assertTrue('2' in al['org.jboss:jboss-foo:jar'])