fix(tests): delete test_overridden_pip_constraint (#2957)
* fix: test_overridden_pip_constraint with pip>=26.2 * fix(tests): delete test_overridden_pip_constraint This test is not needed since #2583 and will fail with pip>=26.2
This commit is contained in:
@@ -100,63 +100,3 @@ def test_overridden_path(tmp_path: Path, capfd: pytest.CaptureFixture[str]) -> N
|
||||
assert "python available on PATH doesn't match our installed instance" in captured.err.replace(
|
||||
"venv", "installed"
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"build_frontend",
|
||||
[
|
||||
pytest.param("pip", marks=utils.skip_if_pyodide("No pip for pyodide")),
|
||||
pytest.param(
|
||||
"build",
|
||||
marks=utils.skip_if_pyodide(
|
||||
"pyodide doesn't support multiple values for PIP_CONSTRAINT"
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_overridden_pip_constraint(tmp_path: Path, build_frontend: str) -> None:
|
||||
"""
|
||||
Verify that users can use PIP_CONSTRAINT to specify a specific version of
|
||||
a build-system.requires dependency, by asserting the version of pytz in the
|
||||
setup.py.
|
||||
"""
|
||||
project_dir = tmp_path / "project"
|
||||
|
||||
project = test_projects.new_c_project(
|
||||
setup_py_add=textwrap.dedent(
|
||||
"""
|
||||
import pytz
|
||||
assert pytz.__version__ == "2022.4", f"{pytz.__version__!r} != '2022.4'"
|
||||
"""
|
||||
)
|
||||
)
|
||||
project.files["pyproject.toml"] = textwrap.dedent(
|
||||
"""
|
||||
[build-system]
|
||||
requires = ["setuptools", "pytz"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
"""
|
||||
)
|
||||
project.generate(project_dir)
|
||||
|
||||
if utils.get_platform() == "linux":
|
||||
# put the constraints file in the project directory, so it's available
|
||||
# in the docker container
|
||||
constraints_file = project_dir / "constraints.txt"
|
||||
else:
|
||||
constraints_file = tmp_path / "constraints.txt"
|
||||
|
||||
constraints_file.write_text("pytz==2022.4")
|
||||
|
||||
actual_wheels = utils.cibuildwheel_run(
|
||||
project_dir,
|
||||
add_env={
|
||||
"CIBW_BUILD_FRONTEND": build_frontend,
|
||||
"PIP_CONSTRAINT": str(constraints_file),
|
||||
"CIBW_ENVIRONMENT_LINUX": "PIP_CONSTRAINT=./constraints.txt",
|
||||
},
|
||||
single_python=True,
|
||||
)
|
||||
|
||||
expected_wheels = utils.expected_wheels("spam", "0.1.0", single_python=True)
|
||||
assert set(actual_wheels) == set(expected_wheels)
|
||||
|
||||
Reference in New Issue
Block a user