Skip to content

Commit 7410da3

Browse files
committed
tests: skip uv on the dep constraints tests
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 319ea4d commit 7410da3

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

test/conftest.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,18 @@ def pytest_addoption(parser) -> None:
3131
@pytest.fixture(
3232
params=[{"CIBW_BUILD_FRONTEND": "pip"}, {"CIBW_BUILD_FRONTEND": "build"}], ids=["pip", "build"]
3333
)
34-
def build_frontend_env(request) -> dict[str, str]:
34+
def build_frontend_env_nouv(request) -> dict[str, str]:
3535
if platform == "pyodide":
3636
pytest.skip("Can't use pip as build frontend for pyodide platform")
3737

38-
if request.param["CIBW_BUILD_FRONTEND"] == "build" and find_uv() is not None:
38+
return request.param # type: ignore[no-any-return]
39+
40+
41+
def build_frontend_env(build_frontend_env_nouv: dict[str, str]) -> dict[str, str]:
42+
if build_frontend_env_nouv["CIBW_BUILD_FRONTEND"] == "build" and find_uv() is not None:
3943
return {"CIBW_BUILD_FRONTEND": "build[uv]"}
4044

41-
return request.param # type: ignore[no-any-return]
45+
return build_frontend_env_nouv
4246

4347

4448
@pytest.fixture()

test/test_dependency_versions.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def get_versions_from_constraint_file(constraint_file):
5353

5454

5555
@pytest.mark.parametrize("python_version", ["3.6", "3.8", "3.10"])
56-
def test_pinned_versions(tmp_path, python_version, build_frontend_env):
56+
def test_pinned_versions(tmp_path, python_version, build_frontend_env_nouv):
5757
if utils.platform == "linux":
5858
pytest.skip("linux doesn't pin individual tool versions, it pins manylinux images instead")
5959
if python_version == "3.6" and utils.platform == "macos" and platform.machine() == "arm64":
@@ -79,7 +79,7 @@ def test_pinned_versions(tmp_path, python_version, build_frontend_env):
7979
add_env={
8080
"CIBW_BUILD": build_pattern,
8181
"CIBW_ENVIRONMENT": cibw_environment_option,
82-
**build_frontend_env,
82+
**build_frontend_env_nouv,
8383
},
8484
)
8585

@@ -93,21 +93,23 @@ def test_pinned_versions(tmp_path, python_version, build_frontend_env):
9393
assert set(actual_wheels) == set(expected_wheels)
9494

9595

96-
def test_dependency_constraints_file(tmp_path, build_frontend_env):
96+
def test_dependency_constraints_file(tmp_path, build_frontend_env_nouv):
9797
if utils.platform == "linux":
9898
pytest.skip("linux doesn't pin individual tool versions, it pins manylinux images instead")
9999

100100
project_dir = tmp_path / "project"
101101
project_with_expected_version_checks.generate(project_dir)
102102

103103
tool_versions = {
104+
"pip": "23.1.2",
104105
"delocate": "0.10.3",
105106
}
106107

107108
constraints_file = tmp_path / "constraints file.txt"
108109
constraints_file.write_text(
109110
textwrap.dedent(
110111
"""
112+
pip=={pip}
111113
delocate=={delocate}
112114
""".format(**tool_versions)
113115
)
@@ -128,7 +130,7 @@ def test_dependency_constraints_file(tmp_path, build_frontend_env):
128130
"CIBW_ENVIRONMENT": cibw_environment_option,
129131
"CIBW_DEPENDENCY_VERSIONS": str(constraints_file),
130132
"CIBW_SKIP": "cp36-*",
131-
**build_frontend_env,
133+
**build_frontend_env_nouv,
132134
},
133135
)
134136

0 commit comments

Comments
 (0)