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

CI: Reduce pip behaviour dependencies in test suite #2105

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.t.err

# Python cruft
__pycache__
*.pyc

# Virtualenvs
Expand Down
14 changes: 13 additions & 1 deletion tests/test_cli_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3428,10 +3428,21 @@ def test_compile_recursive_extras_build_targets(runner, tmp_path, current_resolv
[project.optional-dependencies]
footest = ["small-fake-b"]
dev = ["foo[footest]"]
[build-system]
requires = ["setuptools == 70.0.0"]
build-backend = "setuptools.build_meta"
"""
)
)
(tmp_path / "constraints.txt").write_text("wheel<0.43")
version_constraints = [
"setuptools<70.1.0",
"wheel<0.43",
]
constraints_file = tmp_path / "constraints.txt"
constraints_file.write_text("\n".join(version_constraints))
env = os.environ.copy() # Copy entire env to avoid Windows compatibility issues
# Work around https://github.com/jazzband/pip-tools/pull/1681/files#r1667748889
env["PIP_CONSTRAINT"] = str(constraints_file)
out = runner.invoke(
cli,
[
Expand All @@ -3451,6 +3462,7 @@ def test_compile_recursive_extras_build_targets(runner, tmp_path, current_resolv
"--output-file",
"-",
],
env=env,
)
expected = rf"""foo[footest] @ {tmp_path.as_uri()}
small-fake-a==0.2
Expand Down
3 changes: 0 additions & 3 deletions tests/test_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,7 @@ def test_diff_should_not_uninstall(fake_dist):
"pip-tools==1.1.1",
"pip-review==1.1.1",
"pkg-resources==0.0.0",
"setuptools==34.0.0",
"wheel==0.29.0",
"python==3.0",
"distribute==0.1",
"wsgiref==0.1",
"argparse==0.1",
)
Expand Down
Loading