Skip to content

Commit 40abe0e

Browse files
committed
update tests
1 parent f8f38e9 commit 40abe0e

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

libmambapy/tests/test_specs.py

+16-3
Original file line numberDiff line numberDiff line change
@@ -767,12 +767,25 @@ def test_PackageInfo():
767767
# str
768768
assert str(pkg) == "pkg-1.0-bld"
769769

770-
# from_url
771-
pkg = PackageInfo.from_url("https://repo.mamba.pm/conda-forge/linux-64/bar-5.1-xld.conda#01234")
770+
# from_url with md5
771+
pkg = PackageInfo.from_url(
772+
"https://repo.mamba.pm/conda-forge/linux-64/bar-5.1-xld.conda"
773+
"#01234012340123401234012340123401"
774+
)
775+
assert pkg.name == "bar"
776+
assert pkg.version == "5.1"
777+
assert pkg.build_string == "xld"
778+
assert pkg.md5 == "01234012340123401234012340123401"
779+
780+
# from_url with sha256
781+
pkg = PackageInfo.from_url(
782+
"https://repo.mamba.pm/conda-forge/linux-64/bar-5.1-xld.conda"
783+
"#0123401234012340123401234012340101234012340123401234012340123401"
784+
)
772785
assert pkg.name == "bar"
773786
assert pkg.version == "5.1"
774787
assert pkg.build_string == "xld"
775-
assert pkg.md5 == "01234"
788+
assert pkg.md5 == "0123401234012340123401234012340101234012340123401234012340123401"
776789

777790
# getters and setters
778791
pkg.name = "foo"

0 commit comments

Comments
 (0)