Skip to content

Commit 8a4d049

Browse files
committed
Remove test_nonpep517_setuptools_import_failure test
The --no-use-pep517 option has been removed from pip as part of the move to PEP 517-only builds. This test is no longer valid and was causing failures. Also removed the no-longer-needed make_wheel import.
1 parent d3e377c commit 8a4d049

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

tests/functional/test_install_reqs.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
requirements_file,
1919
)
2020
from tests.lib.local_repos import local_checkout
21-
from tests.lib.wheel import make_wheel
2221

2322

2423
class ArgRecordingSdist:
@@ -944,29 +943,6 @@ def test_config_settings_local_to_package(
944943
assert "--verbose" not in simple2_args
945944

946945

947-
def test_nonpep517_setuptools_import_failure(script: PipTestEnvironment) -> None:
948-
"""Any import failures of `setuptools` should inform the user both that it's
949-
not pip's fault, but also exactly what went wrong in the import."""
950-
# Install a poisoned version of 'setuptools' that fails to import.
951-
name = "setuptools_poisoned"
952-
module = """\
953-
raise ImportError("this 'setuptools' was intentionally poisoned")
954-
"""
955-
path = make_wheel(name, "0.1.0", extra_files={"setuptools.py": module}).save_to_dir(
956-
script.scratch_path
957-
)
958-
script.pip("install", "--no-index", path)
959-
960-
result = script.pip_install_local("--no-use-pep517", "simple", expect_error=True)
961-
nice_message = (
962-
"ERROR: Can not execute `setup.py`"
963-
" since setuptools failed to import in the build environment"
964-
)
965-
exc_message = "ImportError: this 'setuptools' was intentionally poisoned"
966-
assert nice_message in result.stderr
967-
assert exc_message in result.stderr
968-
969-
970946
class TestEditableDirectURL:
971947
def test_install_local_project(
972948
self, script: PipTestEnvironment, data: TestData, common_wheels: Path

0 commit comments

Comments
 (0)