diff --git a/tests/data/pixi_tomls/python_mismatch.toml b/tests/data/pixi_tomls/python_mismatch.toml new file mode 100644 index 000000000..22751a68d --- /dev/null +++ b/tests/data/pixi_tomls/python_mismatch.toml @@ -0,0 +1,12 @@ +[project] +channels = ["conda-forge"] +name = "test" +platforms = ["osx-arm64", "linux-64"] + +[target.linux-64.dependencies] +python = "3.12" +[target.osx-arm64.dependencies] +python = "3.13" + +[pypi-dependencies] +finch-mlir = "==0.0.2" diff --git a/tests/integration_python/test_edge_cases.py b/tests/integration_python/test_edge_cases.py new file mode 100644 index 000000000..fa569acc5 --- /dev/null +++ b/tests/integration_python/test_edge_cases.py @@ -0,0 +1,38 @@ +from pathlib import Path +import pytest +import platform +from .common import verify_cli_command, ExitCode + + +@pytest.mark.slow +def test_pypi_git_deps(pixi: Path, tmp_path: Path) -> None: + """Test where we need to lookup recursive git dependencies and consider them first party""" + test_data = Path(__file__).parent.parent / "data/pixi_tomls/pip_git_dep.toml" + manifest = tmp_path.joinpath("pixi.toml") + toml = test_data.read_text() + manifest.write_text(toml) + + # Run the installation + verify_cli_command( + [pixi, "install", "--manifest-path", manifest], + ExitCode.SUCCESS, + ) + + +@pytest.mark.slow +@pytest.mark.skipif( + not (platform.system() == "Darwin" and platform.machine() == "arm64"), + reason="Test tailored for macOS arm so that we can get two different python interpreters", +) +def test_python_mismatch(pixi: Path, tmp_path: Path) -> None: + """Test pypi wheel install where the base interpreter is not the same as the target version""" + test_data = Path(__file__).parent.parent / "data/pixi_tomls/python_mismatch.toml" + manifest = tmp_path.joinpath("pixi.toml") + toml = test_data.read_text() + manifest.write_text(toml) + + # Install + verify_cli_command( + [pixi, "install", "--manifest-path", manifest], + ExitCode.SUCCESS, + ) diff --git a/tests/integration_python/test_run_cli.py b/tests/integration_python/test_run_cli.py index f6a44c1ec..7fbc3d848 100644 --- a/tests/integration_python/test_run_cli.py +++ b/tests/integration_python/test_run_cli.py @@ -1,5 +1,4 @@ from pathlib import Path -import pytest from .common import verify_cli_command, ExitCode, default_env_path ALL_PLATFORMS = '["linux-64", "osx-64", "win-64", "linux-ppc64le", "linux-aarch64"]' @@ -154,17 +153,3 @@ def test_prefix_revalidation(pixi: Path, tmp_path: Path, dummy_channel_1: str) - # Validate that the dummy-a files are reinstalled for file in dummy_a_meta_files: assert Path(file).exists() - - -@pytest.mark.slow -def test_pypi_git_deps(pixi: Path, tmp_path: Path) -> None: - test_data = Path(__file__).parent.parent / "data/pixi_tomls/pip_git_dep.toml" - manifest = tmp_path.joinpath("pixi.toml") - toml = test_data.read_text() - manifest.write_text(toml) - - # Run the installation - verify_cli_command( - [pixi, "install", "--manifest-path", manifest], - ExitCode.SUCCESS, - )