Skip to content

Commit 1528d60

Browse files
authored
Merge pull request #12787 from mgorny/no-isol-tests
Use `--no-build-isolation` in tests to avoid using Internet
2 parents 7b9d90d + 4353e02 commit 1528d60

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

tests/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ def pip_editable_parts(
395395
"-m",
396396
"pip",
397397
"install",
398+
"--no-build-isolation",
398399
"--target",
399400
pip_self_install_path,
400401
"-e",

tests/functional/test_config_settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ def test_config_settings_implies_pep517(
118118
)
119119
result = script.pip(
120120
"wheel",
121+
"--no-build-isolation",
121122
"--config-settings",
122123
"FOO=Hello",
123124
pkg_path,

tests/functional/test_install.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,9 @@ def test_link_hash_in_dep_fails_require_hashes(
687687
# Build a wheel for pkga and compute its hash.
688688
wheelhouse = tmp_path / "wheehouse"
689689
wheelhouse.mkdir()
690-
script.pip("wheel", "--no-deps", "-w", wheelhouse, project_path)
690+
script.pip(
691+
"wheel", "--no-build-isolation", "--no-deps", "-w", wheelhouse, project_path
692+
)
691693
digest = hashlib.sha256(
692694
wheelhouse.joinpath("pkga-1.0-py3-none-any.whl").read_bytes()
693695
).hexdigest()
@@ -905,7 +907,14 @@ def test_editable_install__local_dir_setup_requires_with_pyproject(
905907
"setup(name='dummy', setup_requires=['simplewheel'])\n"
906908
)
907909

908-
script.pip("install", "--find-links", shared_data.find_links, "-e", local_dir)
910+
script.pip(
911+
"install",
912+
"--no-build-isolation",
913+
"--find-links",
914+
shared_data.find_links,
915+
"-e",
916+
local_dir,
917+
)
909918

910919

911920
def test_install_pre__setup_requires_with_pyproject(

tests/functional/test_self_update.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ def test_self_update_editable(script: Any, pip_src: Any) -> None:
1111
# Step 1. Install pip as non-editable. This is expected to succeed as
1212
# the existing pip in the environment is installed in editable mode, so
1313
# it only places a .pth file in the environment.
14-
proc = script.pip("install", pip_src)
14+
proc = script.pip("install", "--no-build-isolation", pip_src)
1515
assert proc.returncode == 0
1616
# Step 2. Using the pip we just installed, install pip *again*, but
1717
# in editable mode. This could fail, as we'll need to uninstall the running
1818
# pip in order to install the new copy, and uninstalling pip while it's
1919
# running could fail. This test is specifically to ensure that doesn't
2020
# happen...
21-
proc = script.pip("install", "-e", pip_src)
21+
proc = script.pip("install", "--no-build-isolation", "-e", pip_src)
2222
assert proc.returncode == 0

0 commit comments

Comments
 (0)