Skip to content

Commit

Permalink
Added test for lost local req info
Browse files Browse the repository at this point in the history
  • Loading branch information
richafrank committed May 25, 2022
1 parent 41b4d37 commit b11a5c1
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/test_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,22 @@ def test_combine_install_requirements_extras_no_req(
)


def test_combine_install_requirements_with_paths(repository, from_line, make_package):
name = "fake_package_b"
version = "1.0.0"

test_package = make_package(name, version=version)
fake_package = from_line(f"{name} @ {path_to_url(test_package)}")
fake_package_name = from_line(f"{name}=={version}", comes_from=from_line(name))

for pair in [(fake_package, fake_package_name), (fake_package_name, fake_package)]:
combined = combine_install_requirements(repository, pair)
assert str(combined.specifier) == str(fake_package_name.specifier)
assert str(combined.link) == str(fake_package.link)
assert str(combined.local_file_path) == str(fake_package.local_file_path)
assert str(combined.original_link) == str(fake_package.original_link)


def test_compile_failure_shows_provenance(resolver, from_line):
"""
Provenance of conflicting dependencies should be printed on failure.
Expand Down

0 comments on commit b11a5c1

Please sign in to comment.