def test_fetch_latest_version_with_full_scala_version(registry): name = JvmPackageName('com.typesafe', 'scalalogging-slf4j_2.10.0-M6') version = registry.fetch_latest_version(name) assert version.name == name assert version.number == '0.2.0' assert version.licenses == ['Apache 2.0 License'] assert set(version.runtime_dependencies) == set([ Dependency.runtime(JvmPackageName('org.slf4j', 'slf4j-api')), Dependency.runtime(JvmPackageName('org.scala-lang', 'scala-reflect')) ]) assert version.development_dependencies == []
def test_fetch_version_without_scala_version(registry): name = JvmPackageName('org.scala-lang', 'scala-compiler') version = registry.fetch_version(name, '2.9.0') assert version.name == name assert version.number == '2.9.0' assert version.licenses == ['BSD-like'] assert set(version.runtime_dependencies) == set([ Dependency.runtime(JvmPackageName('org.scala-lang', 'scala-library')), Dependency.runtime(JvmPackageName('org.scala-lang', 'jline')) ]) assert version.development_dependencies == []
def test_fetch_version_with_scala_version_without_patch(registry): name = JvmPackageName('org.spire-math', 'kind-projector_2.10') version = registry.fetch_version(name, '0.8.2') assert version.name == name assert version.number == '0.8.2' assert version.licenses == ['MIT'] assert set(version.runtime_dependencies) == set([ Dependency.runtime(JvmPackageName('org.scala-lang', 'scala-compiler')), Dependency.runtime(JvmPackageName('org.scala-lang', 'scala-library')) ]) assert version.development_dependencies == []
def test_fetch_latest_version_without_scala_version(registry): name = JvmPackageName('org.scala-lang', 'scala-compiler') version = registry.fetch_latest_version(name) assert version.name == name assert version.number == '2.13.0-M2' assert version.licenses == ['BSD 3-Clause'] assert set(version.runtime_dependencies) == set([ Dependency.runtime(JvmPackageName('jline', 'jline')), Dependency.runtime(JvmPackageName('org.scala-lang', 'scala-library')), Dependency.runtime(JvmPackageName('org.scala-lang', 'scala-reflect')), Dependency.runtime( JvmPackageName('org.scala-lang.modules', 'scala-xml_2.13.0-M2')) ]) assert version.development_dependencies == []
def test_fetch_latest_version_with_scala_version_without_patch(registry): name = JvmPackageName('org.spire-math', 'kind-projector_2.10') version = registry.fetch_latest_version(name) assert version.name == name assert version.number == '0.9.4' assert version.licenses == ['MIT'] assert set(version.runtime_dependencies) == set([ Dependency.runtime(JvmPackageName('org.scala-lang', 'scala-compiler')), Dependency.runtime(JvmPackageName('org.scala-lang', 'scala-library')), Dependency.runtime( JvmPackageName('org.scalamacros', 'quasiquotes_2.10')) ]) assert set(version.development_dependencies) == set([ Dependency.development( JvmPackageName('com.novocode', 'junit-interface')), Dependency.development(JvmPackageName('org.ensime', 'pcplod_2.10')) ])
def to_dependency(self, pom): group_id = self.__interpolate(self.group_id, pom) artifact_id = self.__interpolate(self.artifact_id, pom) return Dependency(JvmPackageName(group_id, artifact_id), self.kind)