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

Use --no-build-isolation in tests to avoid using Internet #12787

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ def pip_editable_parts(
"-m",
"pip",
"install",
"--no-build-isolation",
"--target",
pip_self_install_path,
"-e",
Expand Down
1 change: 1 addition & 0 deletions tests/functional/test_config_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def test_config_settings_implies_pep517(
)
result = script.pip(
"wheel",
"--no-build-isolation",
"--config-settings",
"FOO=Hello",
pkg_path,
Expand Down
13 changes: 11 additions & 2 deletions tests/functional/test_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,9 @@ def test_link_hash_in_dep_fails_require_hashes(
# Build a wheel for pkga and compute its hash.
wheelhouse = tmp_path / "wheehouse"
wheelhouse.mkdir()
script.pip("wheel", "--no-deps", "-w", wheelhouse, project_path)
script.pip(
"wheel", "--no-build-isolation", "--no-deps", "-w", wheelhouse, project_path
)
digest = hashlib.sha256(
wheelhouse.joinpath("pkga-1.0-py3-none-any.whl").read_bytes()
).hexdigest()
Expand Down Expand Up @@ -903,7 +905,14 @@ def test_editable_install__local_dir_setup_requires_with_pyproject(
"setup(name='dummy', setup_requires=['simplewheel'])\n"
)

script.pip("install", "--find-links", shared_data.find_links, "-e", local_dir)
script.pip(
"install",
"--no-build-isolation",
"--find-links",
shared_data.find_links,
"-e",
local_dir,
)


def test_install_pre__setup_requires_with_pyproject(
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/test_self_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ def test_self_update_editable(script: Any, pip_src: Any) -> None:
# Step 1. Install pip as non-editable. This is expected to succeed as
# the existing pip in the environment is installed in editable mode, so
# it only places a .pth file in the environment.
proc = script.pip("install", pip_src)
proc = script.pip("install", "--no-build-isolation", pip_src)
assert proc.returncode == 0
# Step 2. Using the pip we just installed, install pip *again*, but
# in editable mode. This could fail, as we'll need to uninstall the running
# pip in order to install the new copy, and uninstalling pip while it's
# running could fail. This test is specifically to ensure that doesn't
# happen...
proc = script.pip("install", "-e", pip_src)
proc = script.pip("install", "--no-build-isolation", "-e", pip_src)
assert proc.returncode == 0
Loading