Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test: ignore unavailable versions in preexisting output #1774

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions tests/test_cli_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2030,6 +2030,31 @@ def test_preserve_compiled_prerelease_version(pip_conf, runner):
assert "small-fake-a==0.3b1" in out.stderr.splitlines()


def test_ignore_compiled_unavailable_version(pip_conf, runner, current_resolver):
if current_resolver == "legacy":
pytest.xfail(
"We know this is broken in the legacy resolver, but no fix is planned."
)
AndydeCleyre marked this conversation as resolved.
Show resolved Hide resolved

with open("requirements.in", "w") as req_in:
req_in.write("small-fake-a")

with open("requirements.txt", "w") as req_txt:
req_txt.write("small-fake-a==9999")

out = runner.invoke(cli, ["--no-annotate", "--no-header"])

assert out.exit_code == 0, out
assert "small-fake-a==" in out.stderr
assert "small-fake-a==9999" not in out.stderr.splitlines()

assert (
"Discarding small-fake-a==9999 "
"(from -r requirements.txt (line 1)) "
"to proceed the resolution"
) in out.stderr


def test_prefer_binary_dist(
pip_conf, make_package, make_sdist, make_wheel, tmpdir, runner
):
Expand Down