Skip to content

Commit

Permalink
Create and use @backtracking_resolver_only test decorator
Browse files Browse the repository at this point in the history
Co-authored-by: Albert Tugushev <albert@tugushev.ru>
  • Loading branch information
AndydeCleyre and atugushev committed Dec 13, 2022
1 parent 599a8d2 commit 601b5c4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/test_cli_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
indirect=("current_resolver",),
)

backtracking_resolver_only = pytest.mark.parametrize(
"current_resolver",
("backtracking",),
indirect=("current_resolver",),
)


@pytest.fixture(
autouse=True,
Expand Down Expand Up @@ -2030,11 +2036,8 @@ def test_preserve_compiled_prerelease_version(pip_conf, runner):
assert "small-fake-a==0.3b1" in out.stderr.splitlines()


@backtracking_resolver_only
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."
)

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

0 comments on commit 601b5c4

Please sign in to comment.